From 34b8755cc9d384597919cd71be3a2b6c21364226 Mon Sep 17 00:00:00 2001 From: Ellet Date: Fri, 8 Dec 2023 12:31:07 +0300 Subject: [PATCH] Add bug todo fix --- doc/todo.md | 3 +++ .../raw_editor/raw_editor_state_text_input_client_mixin.dart | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/doc/todo.md b/doc/todo.md index 1800df56b..21de47fe8 100644 --- a/doc/todo.md +++ b/doc/todo.md @@ -34,7 +34,10 @@ This is a todo list page that added recently and will be updated soon. - Fix the bugs of the font family and font size - Try to update Quill Html Converter - When pasting a HTML text from cliboard by not using the context menu builder, the new logic won't work + - When selecting all text and paste HTML text, it will not replace the current text, instead it will add a text - Add strike-through in checkbox text when the checkpoint is checked + - No more using of dynamic + - There is a bug here, the first character is not being formatted when choosing font family or font size and type in the editor ### Bugs diff --git a/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart b/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart index 9d51c5743..aeb2135e7 100644 --- a/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart +++ b/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart @@ -207,6 +207,9 @@ mixin RawEditorStateTextInputClientMixin on EditorState diff.inserted, value.selection, ); + + // TODO: There is a bug here, the first character is not being formatted + if (widget.configurations.controller.selectedFontFamily != null) { widget.configurations.controller.formatText( diff.start, @@ -218,6 +221,8 @@ mixin RawEditorStateTextInputClientMixin on EditorState ); } + // TODO: A bug here too + if (widget.configurations.controller.selectedFontSize != null) { widget.configurations.controller.formatText( diff.start,