How can I implement a rich text editor in FlutterFlow that allows me to edit text in HTML, save this content in Firestore in HTML format, and display it properly formatted in a WebView? I tried HtmlEditorEnhanced, but I'm having issues with custom fonts in FlutterFlow. Is there a way to apply a specific font like Yeseva One in the WebView?
Html editor enhanced
I got help from chatgpt, he gave all the code since i am not a coder:
FlutterQuill:
You attempted to use
flutter_quill
, but faced multiple issues, including missing required parameters (focusNode
,scrollController
) and undefined named parameters (readOnly
,autoFocus
,expands
, etc.).You also encountered an error stating that
basic()
was not defined forQuillToolbar
.
FlutterRichTextEditor:
You tried to use
flutter_rich_text_editor
, but the package could not be found or installed in FlutterFlow.
HtmlEnhancedEditor:
You attempted to use
html_enhanced_editor
, but it also failed to install, as it could not be found onpub.dev
.
HtmlEditorEnhanced:
You successfully implemented
HtmlEditorEnhanced
and were able to edit and save HTML-formatted text.You modified the toolbar to include font settings, but custom fonts like Yeseva One did not work as expected.
You attempted to wrap the saved content in a
<div>
with a CSS font style to enforce the custom font, but it did not apply properly.You tried applying fonts directly through the editor’s toolbar but faced limitations in how FlutterFlow handles fonts.
Firestore Storage & Retrieval Issues:
You confirmed that the HTML content is correctly stored in Firestore.
However, when retrieving the content via a query in FlutterFlow, the
content
field appeared empty, even though the data was visible in Firestore.
Displaying the HTML Content in a WebView:
You explored rendering the stored HTML content inside a WebView.
You considered passing the content through a custom function to modify the HTML before displaying it in the WebView.
Custom Fonts in FlutterFlow:
You investigated whether FlutterFlow allows adding custom fonts and whether a custom function could be used to enforce a specific font in the WebView.