From 48bd1741427352d3b5d9cc4df20e9bdc680b9331 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 4 Jun 2021 12:58:16 +0000 Subject: [PATCH 1/3] Restyled by prettier-markdown --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e6b46d4..a35681d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # ✨ rich_editor + [![pub package](https://img.shields.io/pub/v/rich_editor.svg)](https://pub.dartlang.org/packages/rich_editor) [![pub points](https://badges.bar/rich_editor/pub%20points)](https://pub.dev/packages/rich_editor/score) @@ -7,6 +8,7 @@ WYSIWYG editor for Flutter with a rich set of supported formatting options. Based on https://github.com/dankito/RichTextEditor, but for Flutter. ## ✨ Features + - [x] Bold, Italic, Underline, Strike through, Subscript, Superscript - [x] Heading 1 - 6, Text body, Preformatted, Block quote - [x] Font (reads all system fonts) (Android only) @@ -26,9 +28,12 @@ Based on https://github.com/dankito/RichTextEditor, but for Flutter. - [ ] Icon indicators ## 📸 Screenshots - + + + ## Usage + ```dart // Insert widget into tree RichEditor( @@ -57,24 +62,29 @@ Based on https://github.com/dankito/RichTextEditor, but for Flutter. ``` Get current HTML from editor + ```dart String? html = await keyEditor.currentState?.getHtml(); print(html); ``` Set Focus and Unfocus + ```dart await keyEditor.currentState?.focus(); await keyEditor.currentState?.unFocus(); ``` Clear Editor content + ```dart await keyEditor.currentState?.clear(); ``` ### Custom Toolbar -If you're interested in creating your own toolbar check the custom_toolbar_demo.dart in the example + +If you're interested in creating your own toolbar check the +custom_toolbar_demo.dart in the example ## License @@ -90,4 +100,4 @@ If you're interested in creating your own toolbar check the custom_toolbar_demo. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. From 03310848210381517ebecc71d1af231d75aaec57 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 4 Jun 2021 12:58:17 +0000 Subject: [PATCH 2/3] Restyled by prettier-yaml --- pubspec.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 879034a..645ec83 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -27,10 +27,9 @@ dev_dependencies: # The following section is specific to Flutter. flutter: - # To add assets to your package, add an assets section, like this: assets: - - assets/editor/ + - assets/editor/ # # For details regarding assets in packages, see # https://flutter.dev/assets-and-images/#from-packages From dcfbaa2cd1c775d35e964175f0f3190efb026924 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 4 Jun 2021 12:58:17 +0000 Subject: [PATCH 3/3] Restyled by whitespace --- lib/src/models/enum/bar_position.dart | 2 +- lib/src/models/enum/command_name.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/models/enum/bar_position.dart b/lib/src/models/enum/bar_position.dart index 67150ad..7f63065 100644 --- a/lib/src/models/enum/bar_position.dart +++ b/lib/src/models/enum/bar_position.dart @@ -1,2 +1,2 @@ /// Position the inbuilt Toolbar or use your custom toolbar -enum BarPosition { TOP, BOTTOM, CUSTOM } \ No newline at end of file +enum BarPosition { TOP, BOTTOM, CUSTOM } diff --git a/lib/src/models/enum/command_name.dart b/lib/src/models/enum/command_name.dart index 2dbb90c..b1607b7 100644 --- a/lib/src/models/enum/command_name.dart +++ b/lib/src/models/enum/command_name.dart @@ -38,4 +38,4 @@ enum CommandName { INSERTCHECKBOX, // pseudo commands for toggling grouped command views EXPANDING_SEARCH_VIEWING, -} \ No newline at end of file +}