diff --git a/README.md b/README.md index 9bd578bc..39b8ffa4 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ Pub: [FlutterQuill] ## Table of contents - [Flutter Quill](#flutter-quill) - [Table of contents](#table-of-contents) - - [Installation](#installation) - [Screenshots](#screenshots) + - [Installation](#installation) - [Usage](#usage) - [Migration](#migration) - [Input / Output](#input--output) @@ -53,6 +53,20 @@ Pub: [FlutterQuill] - [Testing](#testing) - [Contributors](#contributors) +## Screenshots + +
+Tap to show/hide screenshots + +
+ +Screenshot 1 +Screenshot 2 +Screenshot 3 +Screenshot 4 + +
+ ## Installation ```yaml @@ -86,20 +100,6 @@ Compatible versions: Theses versions are tested and well supported, you shouldn't get a build failure -## Screenshots - -
-Tap to show/hide screenshots - -
- -Screenshot 1 -Screenshot 2 -Screenshot 3 -Screenshot 4 - -
- ## Usage See the `example` directory for a minimal example of how to use FlutterQuill. You typically just need to instantiate a controller: diff --git a/example/lib/pages/home_page.dart b/example/lib/pages/home_page.dart index d9b4b0bd..017d5b43 100644 --- a/example/lib/pages/home_page.dart +++ b/example/lib/pages/home_page.dart @@ -274,7 +274,6 @@ class _HomePageState extends State { final navigator = Navigator.of(context); try { final html = _controller.document.toDelta().toHtml(); - print(html); _controller.document = Document.fromDelta(DeltaHtmlExt.fromHtml(html)); } catch (e) { diff --git a/packages/quill_html_converter/LICENSE b/packages/quill_html_converter/LICENSE index ba75c69f..e82b91ed 100644 --- a/packages/quill_html_converter/LICENSE +++ b/packages/quill_html_converter/LICENSE @@ -1 +1,21 @@ -TODO: Add your license here. +MIT License + +Copyright (c) 2023 Flutter Quill Team + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/quill_html_converter/README.md b/packages/quill_html_converter/README.md index 9c30d57e..1cada7e2 100644 --- a/packages/quill_html_converter/README.md +++ b/packages/quill_html_converter/README.md @@ -3,20 +3,38 @@ A extension for [flutter_quill](https://pub.dev/packages/flutter_quill) package It uses [vsc_quill_delta_to_html](https://pub.dev/packages/vsc_quill_delta_to_html) package to convert the the delta to HTML +This library is **experimental** and the support might be dropped at anytime. + ## Features ```markdown - Easy to use -- Support with Flutter Quill package +- Support Flutter Quill package ``` ## Getting started -This will be updated soon. +```yaml +dependencies: + quill_html_converter: ^ +``` ## Usage -Take a look at the example of the repo, This will be updated soon. +First, you need to [setup](../../README.md#usage) the `flutter_quill` first + +Then you can simply convert to/from HTML + +```dart +import 'package:quill_html_converter/quill_html_converter.dart'; + +// Convert Delta to HTML +final html = _controller.document.toDelta().toHtml(); + +// Load Delta document using HTML +_controller.document = + Document.fromDelta(DeltaHtmlExt.fromHtml(html)); +``` ## Additional information