docs: improve README.md

pull/1924/head
Ellet 10 months ago
parent 3b7b1081a0
commit 97a08b82b7
  1. 136
      README.md

@ -1,7 +1,7 @@
# Flutter Quill # Flutter Quill
<p align="center" style="background-color:#282C34"> <p align="center" style="background-color:#282C34">
<img src="https://user-images.githubusercontent.com/10923085/119221946-2de89000-baf2-11eb-8285-68168a78c658.png" width="600px"> <img src="https://user-images.githubusercontent.com/10923085/119221946-2de89000-baf2-11eb-8285-68168a78c658.png" width="600px" alt="Flutter Quill">
</p> </p>
<h1 align="center">A rich text editor for Flutter</h1> <h1 align="center">A rich text editor for Flutter</h1>
@ -12,14 +12,23 @@
[![Watch on GitHub][github-forks-badge]][github-forks-link] [![Watch on GitHub][github-forks-badge]][github-forks-link]
[license-badge]: https://img.shields.io/github/license/singerdmx/flutter-quill.svg?style=for-the-badge [license-badge]: https://img.shields.io/github/license/singerdmx/flutter-quill.svg?style=for-the-badge
[license-link]: ./LICENSE [license-link]: ./LICENSE
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge [prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
[prs-link]: https://github.com/singerdmx/flutter-quill/issues [prs-link]: https://github.com/singerdmx/flutter-quill/issues
[github-watch-badge]: https://img.shields.io/github/watchers/singerdmx/flutter-quill.svg?style=for-the-badge&logo=github&logoColor=ffffff [github-watch-badge]: https://img.shields.io/github/watchers/singerdmx/flutter-quill.svg?style=for-the-badge&logo=github&logoColor=ffffff
[github-watch-link]: https://github.com/singerdmx/flutter-quill/watchers [github-watch-link]: https://github.com/singerdmx/flutter-quill/watchers
[github-star-badge]: https://img.shields.io/github/stars/singerdmx/flutter-quill.svg?style=for-the-badge&logo=github&logoColor=ffffff [github-star-badge]: https://img.shields.io/github/stars/singerdmx/flutter-quill.svg?style=for-the-badge&logo=github&logoColor=ffffff
[github-star-link]: https://github.com/singerdmx/flutter-quill/stargazers [github-star-link]: https://github.com/singerdmx/flutter-quill/stargazers
[github-forks-badge]: https://img.shields.io/github/forks/singerdmx/flutter-quill.svg?style=for-the-badge&logo=github&logoColor=ffffff [github-forks-badge]: https://img.shields.io/github/forks/singerdmx/flutter-quill.svg?style=for-the-badge&logo=github&logoColor=ffffff
[github-forks-link]: https://github.com/singerdmx/flutter-quill/network/members [github-forks-link]: https://github.com/singerdmx/flutter-quill/network/members
--- ---
@ -27,35 +36,36 @@
FlutterQuill is a rich text editor and a [Quill] component for [Flutter]. FlutterQuill is a rich text editor and a [Quill] component for [Flutter].
This library is a WYSIWYG (What You See Is What You Get) editor built This library is a WYSIWYG (What You See Is What You Get) editor built
for the modern Android, iOS, for the modern Android, iOS,
web and desktop platforms. web and desktop platforms.
Check out our [Youtube Playlist] or [Code Introduction](./doc/code_introduction.md) Check out our [Youtube Playlist] or [Code Introduction](./doc/code_introduction.md)
to take a detailed walkthrough of the code base. to take a detailed walkthrough of the code base.
You can join our [Slack Group] for discussion. You can join our [Slack Group] for discussion.
> If you are viewing this page from [pub.dev](https://pub.dev/) page, then you > If you are viewing this page from [pub.dev](https://pub.dev/) page, then you
might have some issues with opening some links, open it in the GitHub repo instead. > might have some issues with opening some links, open it in the GitHub repo instead.
## Table of contents ## Table of contents
- [Flutter Quill](#flutter-quill) - [Flutter Quill](#flutter-quill)
- [Table of contents](#table-of-contents) - [Table of contents](#table-of-contents)
- [Screenshots](#screenshots) - [Screenshots](#screenshots)
- [Installation](#installation) - [Installation](#installation)
- [Platform Specific Configurations](#platform-specific-configurations) - [Platform Specific Configurations](#platform-specific-configurations)
- [Usage](#usage) - [Usage](#usage)
- [Migration](#migration) - [Migration](#migration)
- [Input / Output](#input--output) - [Input / Output](#input--output)
- [Links](#links) - [Links](#links)
- [Configurations](#configurations) - [Configurations](#configurations)
- [Links](#links-1) - [Links](#links-1)
- [Font Family](#font-family) - [Font Family](#font-family)
- [Embed Blocks](#embed-blocks) - [Embed Blocks](#embed-blocks)
- [Using the embed blocks from `flutter_quill_extensions`](#using-the-embed-blocks-from-flutter_quill_extensions) - [Using the embed blocks from `flutter_quill_extensions`](#using-the-embed-blocks-from-flutter_quill_extensions)
- [Links](#links-2) - [Links](#links-2)
- [Conversion to HTML](#conversion-to-html) - [Conversion to HTML](#conversion-to-html)
- [Translation](#translation) - [Translation](#translation)
- [Testing](#testing) - [Testing](#testing)
- [Contributors](#contributors) - [Contributors](#contributors)
## Screenshots ## Screenshots
@ -86,22 +96,27 @@ dependencies:
git: https://github.com/singerdmx/flutter-quill.git git: https://github.com/singerdmx/flutter-quill.git
``` ```
> Using the latest version and reporting any issues you encounter on GitHub will greatly contribute to the improvement of the library. > Using the latest version and reporting any issues you encounter on GitHub will greatly contribute to the improvement
> Your input and insights are valuable in shaping a stable and reliable version for all the developers. Thank you for being part of the open-source community! > of the library.
> Your input and insights are valuable in shaping a stable and reliable version for all the developers. Thank you for
> being part of the open-source community!
> >
## Platform Specific Configurations ## Platform Specific Configurations
Before using the package, we must inform you the package use the following plugins: Before using the package, we must inform you the package uses the following plugins:
``` ```
url_launcher url_launcher
flutter_keyboard_visibility flutter_keyboard_visibility
device_info_plus device_info_plus
``` ```
All of them doesn't require any platform specific setup. All of them don't require any platform-specific setup.
> Starting from Flutter Quill `9.4.x`, [super_clipboard](https://pub.dev/packages/super_clipboard) has been moved to [FlutterQuill Extensions], to use rich text features, support pasting images, gif files, take a look at `flutter_quill_extensions` Readme. > Starting from Flutter Quill `9.4.x`, [super_clipboard](https://pub.dev/packages/super_clipboard) has been moved
> to [FlutterQuill Extensions], to use rich text features, support pasting images, gif files, take a look
> at `flutter_quill_extensions` Readme.
## Usage ## Usage
@ -143,6 +158,7 @@ in most cases, it's better to.
Check out [Sample Page] for more advanced usage. Check out [Sample Page] for more advanced usage.
## Migration ## Migration
Starting from version `8.0.0` Starting from version `8.0.0`
We have added [Migration Guide](/doc/migration.md) for migration from different versions We have added [Migration Guide](/doc/migration.md) for migration from different versions
@ -170,7 +186,7 @@ final json = jsonEncode(_controller.document.toDelta().toJson());
You can then write this to storage. You can then write this to storage.
To open a FlutterQuill editor with an existing JSON representation that you've previously stored, To open a FlutterQuill editor with an existing JSON representation that you've previously stored,
you can do something like this: you can do something like this:
```dart ```dart
@ -194,6 +210,7 @@ The `QuillToolbar` and `QuillEditor` widgets let you customize a lot of things
[Sample Page] provides sample code for advanced usage and configuration. [Sample Page] provides sample code for advanced usage and configuration.
### Links ### Links
- [Using Custom App Widget](./doc/configurations/using_custom_app_widget.md) - [Using Custom App Widget](./doc/configurations/using_custom_app_widget.md)
- [Localizations Setup](./doc/configurations/localizations_setup.md) - [Localizations Setup](./doc/configurations/localizations_setup.md)
- [Font Size](./doc/configurations/font_size.md) - [Font Size](./doc/configurations/font_size.md)
@ -202,19 +219,27 @@ The `QuillToolbar` and `QuillEditor` widgets let you customize a lot of things
### Font Family ### Font Family
To use your own fonts, update your [assets folder](./example/assets/fonts) and pass in `fontFamilyValues`. To use your own fonts, update your [Assets](./example/assets/fonts) folder and pass in `fontFamilyValues`.
More details on [this commit](https://github.com/singerdmx/flutter-quill/commit/71d06f6b7be1b7b6dba2ea48e09fed0d7ff8bbaa), More details
[this article](https://stackoverflow.com/questions/55075834/fontfamily-property-not-working-properly-in-flutter) and [this](https://www.flutterbeads.com/change-font-family-flutter/). on [this commit](https://github.com/singerdmx/flutter-quill/commit/71d06f6b7be1b7b6dba2ea48e09fed0d7ff8bbaa),
[this article](https://stackoverflow.com/questions/55075834/fontfamily-property-not-working-properly-in-flutter)
and [this](https://www.flutterbeads.com/change-font-family-flutter/).
## Embed Blocks ## Embed Blocks
As of version 6.0, embed blocks are not provided by default as part of this package. Instead, this package provides an interface for all the users to provide their own implementations for embed blocks. Implementations for image, video, and formula embed blocks are proved in a separate package [`flutter_quill_extensions`](https://pub.dev/packages/flutter_quill_extensions). As of version 6.0, embed blocks are not provided by default as part of this package.
Instead, this package provides an interface for all the users to provide their own implementations for embed blocks.
Implementations for image, video, and
formula embed blocks are proved in a separate
package [`flutter_quill_extensions`](https://pub.dev/packages/flutter_quill_extensions).
Provide a list of embed Provide a list of embed
### Using the embed blocks from `flutter_quill_extensions` ### Using the embed blocks from `flutter_quill_extensions`
To see how to use the extension package, please take a look at the [README](./flutter_quill_extensions/README.md) of [FlutterQuill Extensions] To see how to use the extension package, please take a look at the [README](./flutter_quill_extensions/README.md)
of [FlutterQuill Extensions]
### Links ### Links
@ -226,25 +251,30 @@ To see how to use the extension package, please take a look at the [README](./fl
Having your document stored in Quill Delta format is sometimes not enough. Often you'll need to convert Having your document stored in Quill Delta format is sometimes not enough. Often you'll need to convert
it to other formats such as HTML to publish it, or send an email. it to other formats such as HTML to publish it, or send an email.
**Note**: This package supports converting from HTML back to Quill delta but it's experimental and used internally when pasting HTML content from the clipboard to the Quill Editor **Note**: This package supports converting from HTML back to Quill delta but it's experimental and used internally when
pasting HTML content from the clipboard to the Quill Editor
You have two options: You have two options:
1. Using [quill_html_converter](./quill_html_converter/) to convert to HTML, the package can convert the Quill delta to HTML well 1. Using [quill_html_converter](./quill_html_converter/) to convert to HTML, the package can convert the Quill delta to
(it uses [vsc_quill_delta_to_html](https://pub.dev/packages/vsc_quill_delta_to_html)), it is just a handy extension to do it more quickly HTML well
1. Another option is to use (it uses [vsc_quill_delta_to_html](https://pub.dev/packages/vsc_quill_delta_to_html)), it is just a handy extension
[vsc_quill_delta_to_html](https://pub.dev/packages/vsc_quill_delta_to_html) to convert your document to do it more quickly
to HTML. 2. Another option is to use
[vsc_quill_delta_to_html](https://pub.dev/packages/vsc_quill_delta_to_html) to convert your document
to HTML.
This package has full support for all Quill operations—including images, videos, formulas, This package has full support for all Quill operations—including images, videos, formulas,
tables, and mentions. tables, and mentions.
Conversion can be performed in vanilla Dart (i.e., server-side or CLI) or in Flutter. Conversion can be performed in vanilla Dart (i.e., server-side or CLI) or in Flutter.
It is a complete Dart part of the popular and mature [quill-delta-to-html](https://www.npmjs.com/package/quill-delta-to-html) It is a complete Dart part of the popular and
Typescript/Javascript package. mature [quill-delta-to-html](https://www.npmjs.com/package/quill-delta-to-html)
Typescript/Javascript package.
this package doesn't convert the HTML back to Quill Delta as far as we know this package doesn't convert the HTML back to Quill Delta as far as we know
## Translation ## Translation
The package offers translations for the quill toolbar and editor, it will follow the system locale unless you set your own locale. The package offers translations for the quill toolbar and editor, it will follow the system locale unless you set your
own locale.
Open this [page](./doc/translation.md) for more info Open this [page](./doc/translation.md) for more info
@ -257,7 +287,7 @@ Please use [flutter_quill_test](https://pub.dev/packages/flutter_quill_test) for
- Special thanks to everyone who has contributed to this project... - Special thanks to everyone who has contributed to this project...
<a href="https://github.com/singerdmx/flutter-quill/graphs/contributors"> <a href="https://github.com/singerdmx/flutter-quill/graphs/contributors">
<img src="https://contrib.rocks/image?repo=singerdmx/flutter-quill" /> <img src="https://contrib.rocks/image?repo=singerdmx/flutter-quill" alt="Contributors"/>
</a> </a>
<br> <br>
@ -269,20 +299,32 @@ Made with [contrib.rocks](https://contrib.rocks).
and contributors who put time and effort into everything including making all the libraries, tools, and the and contributors who put time and effort into everything including making all the libraries, tools, and the
information we rely on information we rely on
- We are incredibly grateful to many individuals and organizations who have played a - We are incredibly grateful to many individuals and organizations who have played a
role in the project. This includes the welcoming community, dedicated volunteers, talented developers and role in the project.
contributors, and the creators of the open-source tools we rely on. This includes the welcoming community, dedicated volunteers, talented developers and
contributors, and the creators of the open-source tools we rely on.
We welcome all contributions! We welcome all contributions!
Please follow these guidelines when contributing to the project. See [CONTRIBUTING.md](./CONTRIBUTING.md) for more details. <br> Please follow these guidelines when contributing to the project.
See [CONTRIBUTING.md](./CONTRIBUTING.md) for more
details.
<br>
The [CONTRIBUTING.md](./CONTRIBUTING.md) has development notes, if you're planning on contributing to the package, please consider reading it. The [CONTRIBUTING.md](./CONTRIBUTING.md) has development notes, if you're planning on contributing to the package,
please consider reading it.
[Quill]: https://quilljs.com/docs/formats [Quill]: https://quilljs.com/docs/formats
[Flutter]: https://github.com/flutter/flutter [Flutter]: https://github.com/flutter/flutter
[FlutterQuill]: https://pub.dev/packages/flutter_quill [FlutterQuill]: https://pub.dev/packages/flutter_quill
[FlutterQuill Extensions]: https://pub.dev/packages/flutter_quill_extensions [FlutterQuill Extensions]: https://pub.dev/packages/flutter_quill_extensions
[ReactQuill]: https://github.com/zenoamaro/react-quill [ReactQuill]: https://github.com/zenoamaro/react-quill
[Youtube Playlist]: https://youtube.com/playlist?list=PLbhaS_83B97vONkOAWGJrSXWX58et9zZ2 [Youtube Playlist]: https://youtube.com/playlist?list=PLbhaS_83B97vONkOAWGJrSXWX58et9zZ2
[Slack Group]: https://join.slack.com/t/bulletjournal1024/shared_invite/zt-fys7t9hi-ITVU5PGDen1rNRyCjdcQ2g [Slack Group]: https://join.slack.com/t/bulletjournal1024/shared_invite/zt-fys7t9hi-ITVU5PGDen1rNRyCjdcQ2g
[Sample Page]: https://github.com/singerdmx/flutter-quill/blob/master/example/lib/screens/quill/quill_screen.dart [Sample Page]: https://github.com/singerdmx/flutter-quill/blob/master/example/lib/screens/quill/quill_screen.dart

Loading…
Cancel
Save