diff --git a/README.md b/README.md index 21d63010..2de31ddf 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,23 @@ _controller = QuillController( The `QuillToolbar` class lets you customise which formatting options are available. [Sample Page] provides sample code for advanced usage and configuration. +#### Font Size +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` consisting of a `String` title for the font size and an `int` value for the font size. Example: +``` +fontSizeValues: const {'Small':8, 'Medium':24, 'Large':46} +``` +If a font size of `0` is used, then font sizing is removed from the given block of text. +``` +fontSizeValues: const {'Default':0, 'Small':8, 'Medium':24, 'Large':46} +``` + +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. + + ## Web For web development, use `flutter config --enable-web` for flutter or use [ReactQuill] for React.