singerdmx / flutter-quill

Rich text editor for Flutter

Home Page:https://pub.dev/packages/flutter_quill

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How is the Font Family toolbar button (QuillToolbarFontFamilyButton) supposed to work?

AtlasAutocode opened this issue · comments

Is there an existing issue for this?

The question

The QuillToolbarFontFamilyButton allows selecting a new font to use for text entry. However, the button's displayed font name is not used for text entry if I move the cursor.

Example:

If I am editing an existing text document (e.g. the text from the example app), I can select a word and then select a font using the toolbar button. The word will be correctly formatted using the selected font.

If I then select/click on a different word, the toolbar continues to show the previously selected font, but any text entered will use the font associated with my current cursor position.

The documentation for QuillController has the comment for '_selectedFontFamily':

// Thoses are the values that the user selects and not the one
// from the current line

OK. But the font that will be used is the one from the current line and not the one displayed by the button.

Is there some reason for this?

commented

This issue is solved now