From 0aeb44250899bd58fb3b7c0c248061a872fd9f51 Mon Sep 17 00:00:00 2001 From: tanay Date: Wed, 10 Mar 2021 12:42:30 -0500 Subject: [PATCH] Fix minor issue with new getText() implementation and prepare 1.5.0+1 to pub --- CHANGELOG.md | 3 ++ example/pubspec.lock | 53 +--------------------- lib/src/html_editor_controller_mobile.dart | 5 +- pubspec.lock | 51 +-------------------- pubspec.yaml | 2 +- 5 files changed, 10 insertions(+), 104 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f580708a..00883b32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [1.5.0+1] - 2021-03-10 +* Fixed getText() returning null on mobile for any device + ## [1.5.0] - 2021-03-01 * Nullsafety preview * Added Flutter's Hybrid Composition to the HTML Editor. This significantly improves the keyboard experience on Android. diff --git a/example/pubspec.lock b/example/pubspec.lock index fe6f34cd..3e652ec0 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -43,13 +43,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" cupertino_icons: dependency: "direct main" description: @@ -57,20 +50,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.2" - device_info: - dependency: transitive - description: - name: device_info - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - device_info_platform_interface: - dependency: transitive - description: - name: device_info_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" fake_async: dependency: transitive description: @@ -89,7 +68,7 @@ packages: name: flutter_inappwebview url: "https://pub.dartlang.org" source: hosted - version: "5.0.4-nullsafety.1" + version: "5.1.0+4" flutter_test: dependency: "direct dev" description: flutter @@ -101,14 +80,7 @@ packages: path: ".." relative: true source: path - version: "1.5.0" - intl: - dependency: transitive - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" + version: "1.5.0+1" js: dependency: transitive description: @@ -130,13 +102,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" - mime: - dependency: transitive - description: - name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" path: dependency: transitive description: @@ -144,13 +109,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -205,13 +163,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" vector_math: dependency: transitive description: diff --git a/lib/src/html_editor_controller_mobile.dart b/lib/src/html_editor_controller_mobile.dart index 717f7465..b472235e 100644 --- a/lib/src/html_editor_controller_mobile.dart +++ b/lib/src/html_editor_controller_mobile.dart @@ -20,10 +20,11 @@ class HtmlEditorController extends unsupported.HtmlEditorController { /// Gets the text from the editor and returns it as a [String]. Future getText() async { getTextStream!.stream.drain(); - await _evaluateJavascript( + _evaluateJavascript( source: "var str = \$('#summernote-2').summernote('code'); console.log(str);"); - return await getTextStream!.stream.first; + String text = await getTextStream!.stream.first; + return text; } /// Sets the text of the editor. Some pre-processing is applied to convert diff --git a/pubspec.lock b/pubspec.lock index 7f6f2239..c8588762 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -43,27 +43,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - device_info: - dependency: transitive - description: - name: device_info - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - device_info_platform_interface: - dependency: transitive - description: - name: device_info_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" fake_async: dependency: transitive description: @@ -82,19 +61,12 @@ packages: name: flutter_inappwebview url: "https://pub.dartlang.org" source: hosted - version: "5.0.4-nullsafety.1" + version: "5.1.0+4" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - intl: - dependency: transitive - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" js: dependency: "direct main" description: @@ -116,13 +88,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" - mime: - dependency: transitive - description: - name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" path: dependency: transitive description: @@ -130,13 +95,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -191,13 +149,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 2c646958..98eb28f3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: html_editor_enhanced description: HTML Editor Enhanced is a feature-packed HTML rich text editor for Android, iOS, and Web, backed by the Summernote library. -version: 1.5.0 +version: 1.5.0+1 homepage: https://github.com/tneotia/html-editor-enhanced environment: