From 90e9d60356e325b91c4073039df65b6b09e159d9 Mon Sep 17 00:00:00 2001 From: mark8044 <87546778+mark8044@users.noreply.github.com> Date: Mon, 9 May 2022 20:54:02 -0700 Subject: [PATCH] Update README.md (#805) --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2de31ddf..a3439a1e 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ _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 +### 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: @@ -101,6 +101,46 @@ The initial value for font-size in the editor can also be defined via _optional_ 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. +### Custom Icons +You may add custom icons to the _end_ of the toolbar, via the `customIcons` option, which is a `List` of `QuillCustomIcon`. + +To add an Icon, we should use a new QuillCustomIcon class +``` + QuillCustomIcon( + icon:Icons.ac_unit, + onTap: (){ + debugPrint('snowflake'); + } + ), +``` + +Each `QuillCustomIcon` is used as part of the `customIcons` option as follows: +``` +QuillToolbar.basic( + (...), + customIcons: [ + QuillCustomIcon( + icon:Icons.ac_unit, + onTap: (){ + debugPrint('snowflake1'); + } + ), + + QuillCustomIcon( + icon:Icons.ac_unit, + onTap: (){ + debugPrint('snowflake2'); + } + ), + + QuillCustomIcon( + icon:Icons.ac_unit, + onTap: (){ + debugPrint('snowflake3'); + } + ), + ] +``` ## Web