fleather-editor / fleather

Soft and gentle rich text editing for Flutter applications.
https://fleather-editor.github.io
Other
203 stars 36 forks source link

Question: Markdown Formatting Not Applied on First Use in FleatherField #429

Open gitStanda opened 1 month ago

gitStanda commented 1 month ago

I need to have 2 different FleatherFields & I don't want to have 2 toolbars shown at the same time - so depending on the focused field, I show toolbar with selected field's controller.

However, I’m experiencing an issue with both FleatherFields where formatting options (e.g., bold, italics, etc.) are not applied correctly when selected before typing. You can see the issue on the attached video.

https://github.com/user-attachments/assets/537e18ca-a44f-4260-8ec9-733332315e8c

It seems like the formatting doesn’t persist until the user types at least one character first. This issue occurs only before any text is entered—after that, the controller behaves normally.

Steps to Reproduce:

  1. Tap into a FleatherField.
  2. Without typing anything, select bold, italics or any other option from the toolbar.
  3. Start typing text.
  4. Notice that the formatting options are unchecked, and the text is not formatted as expected.

Expected Behavior: The selected formatting (bold, italics, ...) should be applied correctly from the first character typed after being selected in the toolbar.

My code:



## Question
Is this behavior expected with FleatherField, or is there something wrong in my code that might be causing it? Any advice on how to resolve this would be appreciated!
gitStanda commented 4 weeks ago

Might be a bug as well, not sure to be honest

amantoux commented 4 weeks ago

Might be a bug as well, not sure to be honest

Sure, we'll take a look

gitStanda commented 3 weeks ago

Might be a bug as well, not sure to be honest

Sure, we'll take a look

Thanks a lot!

gitStanda commented 2 weeks ago

BTW just tested this out on iOS simulator and it works. So maybe the issue is just on Android or the Emulator itself?