This library is a WYSIWYG editor built for the modern mobile platform, with web compatibility under development. Check out our [Youtube Playlist] to take a detailed walkthrough of the code base. You can join our [Slack Group] for discussion.
* Use `_controller.document.toDelta()` to extract the deltas.
* Use `_controller.document.toPlainText()` to extract plain text.
FlutterQuill provides some JSON serialisation support, so that you can save and open documents. To save a document as JSON, do something like the following:
```
var json = jsonEncode(_controller.document.toDelta().toJson());
```
You can then write this to storage.
To open a FlutterQuill editor with an existing JSON representation that you've previously stored, you can do something like this:
Within the editor toolbar, a drop-down with font-sizing capabilties is available. This can be enabled or disabled with `showFontSize`.
When enabled, the default font-size values can be modified via _optional_`fontSizeValues`. `fontSizeValues` accepts a `Map<String, int>` consisting of a `String` title for the font size and an `int` value for the font size. Example:
The initial value for font-size in the editor can also be defined via _optional_`initialFontSizeValue` which corresponds to the index value within your map. For example, if you would like the Medium font size to be the default start size in the above example, you would set `initialFontSizeValue: 2`.
This initial font size is not applied to the delta when first building the widget, it is only used to change the initial value for the drop-down widget.
It is required to provide `EmbedBuilder`, e.g. [defaultEmbedBuilderWeb](https://github.com/singerdmx/flutter-quill/blob/master/example/lib/universal_ui/universal_ui.dart#L28).
Also it is required to provide `webImagePickImpl`, e.g. [Sample Page](https://github.com/singerdmx/flutter-quill/blob/master/example/lib/pages/home_page.dart#L218).
It is required to provide `filePickImpl` for toolbar image button, e.g. [Sample Page](https://github.com/singerdmx/flutter-quill/blob/master/example/lib/pages/home_page.dart#L198).
The translation file is located at [lib/src/translations/toolbar.i18n.dart](lib/src/translations/toolbar.i18n.dart). Feel free to contribute your own translations, just copy the English translations map and replace the values with your translations. Then open a pull request so everyone can benefit from your translations!