Skip to content

Commit

Permalink
Update README.md (singerdmx#796)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark8044 committed May 6, 2022
1 parent 0f1fcd4 commit 31dc6c8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, int>` 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.
Expand Down

0 comments on commit 31dc6c8

Please sign in to comment.