docs: Update README.md

pull/1523/head
Ellet 1 year ago
parent 0b2565b777
commit 74e0cfdc4f
No known key found for this signature in database
GPG Key ID: C488CC70BBCEF0D1
  1. 30
      README.md
  2. 1
      example/lib/pages/home_page.dart
  3. 22
      packages/quill_html_converter/LICENSE
  4. 24
      packages/quill_html_converter/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
<details>
<summary>Tap to show/hide screenshots</summary>
<br>
<img src="./example/assets/images/1.png" width="150" alt="Screenshot 1">
<img src="./example/assets/images/2.png" width="150" alt="Screenshot 2">
<img src="./example/assets/images/3.png" width="150" alt="Screenshot 3">
<img src="./example/assets/images/4.png" width="150" alt="Screenshot 4">
</details>
## Installation
```yaml
@ -86,20 +100,6 @@ Compatible versions:
Theses versions are tested and well supported, you shouldn't get a build failure
## Screenshots
<details>
<summary>Tap to show/hide screenshots</summary>
<br>
<img src="./example/assets/images/1.png" width="150" alt="Screenshot 1">
<img src="./example/assets/images/2.png" width="150" alt="Screenshot 2">
<img src="./example/assets/images/3.png" width="150" alt="Screenshot 3">
<img src="./example/assets/images/4.png" width="150" alt="Screenshot 4">
</details>
## Usage
See the `example` directory for a minimal example of how to use FlutterQuill. You typically just need to instantiate a controller:

@ -274,7 +274,6 @@ class _HomePageState extends State<HomePage> {
final navigator = Navigator.of(context);
try {
final html = _controller.document.toDelta().toHtml();
print(html);
_controller.document =
Document.fromDelta(DeltaHtmlExt.fromHtml(html));
} catch (e) {

@ -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.

@ -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: ^<latest-version-here>
```
## 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

Loading…
Cancel
Save