diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ec23ed..84710b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # Changelog +## 0.7.11+5.65.13 + - add setSizeInCssUnits(String?, String?) to the editor ## 0.7.10+5.65.13 - Update to CodeMirror 5.65.13 diff --git a/lib/codemirror.dart b/lib/codemirror.dart index 120022d..d30b348 100644 --- a/lib/codemirror.dart +++ b/lib/codemirror.dart @@ -495,11 +495,18 @@ class CodeMirror extends ProxyHolder { String? getTokenTypeAt(Position pos) => callArg('getTokenTypeAt', pos); /// Programmatically set the size of the editor (overriding the applicable CSS - /// rules). [width] and [height] can be either numbers (interpreted as pixels) - /// or CSS units ("100%", for example). You can pass `null` for either of them + /// rules). [width] and [height] are numbers (interpreted as pixels). + /// You can pass `null` for either of them /// to indicate that that dimension should not be changed. void setSize(num? width, num? height) => callArgs('setSize', [width, height]); + /// Programmatically set the size of the editor (overriding the applicable CSS + /// rules). [width] and [height] should be CSS units ("100%", for example). + /// You can pass `null` for either of them + /// to indicate that that dimension should not be changed. + void setSizeInCssUnits(String? width, String? height) => + callArgs('setSize', [width, height]); + /// Scroll the editor to a given (pixel) position. Both arguments may be left /// as null or undefined to have no effect. void scrollTo(num? x, num? y) => callArgs('scrollTo', [x, y]); diff --git a/pubspec.yaml b/pubspec.yaml index c4d4bac..37c1f5a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ # license that can be found in the LICENSE file. name: codemirror -version: 0.7.10+5.65.13 +version: 0.7.11+5.65.13 description: A Dart wrapper around the CodeMirror text editor. repository: https://github.com/google/codemirror.dart