flutter-quill icon indicating copy to clipboard operation
flutter-quill copied to clipboard

How to customize FontSize/Family and color, on the context menu?

Open marcio-ota opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

The question

I already customized the button on the taskbar (font size, options), but I can't find how to do it in the menu...

QuillToolbarFontSizeButton(
 controller: controller,
 options: const QuillToolbarFontSizeButtonOptions(
   attribute: Attribute.font,
   initialValue: 'Normal',
   style: TextStyle(fontSize: 14),
   rawItemsMap: { 'Normal': '14, 'Small': '8, 'Large': '16' },
 ),
),

print

marcio-ota avatar Mar 19 '24 14:03 marcio-ota

Developing a 100% customizable library requires a lot of effort, you can use your own button and customize it, we already have Apis for interacting with the editor, you just have to use them to fit your needs

EchoEllet avatar Mar 26 '24 19:03 EchoEllet

    _fontFamilies = {
      'Amatic': GoogleFonts.amaticSc().fontFamily!,
      'Annie': GoogleFonts.annieUseYourTelescope().fontFamily!,
      'Formal': GoogleFonts.petitFormalScript().fontFamily!,
      'Roboto': GoogleFonts.roboto().fontFamily!
    };
 QuillToolbar.simple(
        configurations: QuillSimpleToolbarConfigurations(
            buttonOptions: QuillSimpleToolbarButtonOptions(
                fontFamily: QuillToolbarFontFamilyButtonOptions(rawItemsMap: _fontFamilies, iconSize: 16),
                fontSize: QuillToolbarFontSizeButtonOptions(rawItemsMap: _fontSizes, iconSize: 16),
Screenshot 2024-05-31 at 1 44 48 PM

saconger avatar May 31 '24 18:05 saconger

Closed as answered.

AtlasAutocode avatar Sep 08 '24 18:09 AtlasAutocode