flutter-quill
flutter-quill copied to clipboard
How to customize FontSize/Family and color, on the context menu?
Is there an existing issue for this?
- [X] I have searched the existing issues
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' },
),
),
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
_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),
Closed as answered.