-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to convert the flutter_quill textData with images into html with encoding the images into base64 #1574
Comments
Hi, there is already a package called quill_html_converter |
@ellet0 I don't think you answered @rajcrack's question. The quill_html_converter packages does convert the delta to html, however the toHtml() function doesn't convert the image file path to base64. This issue should be reopened. |
HTML conversation is out of scope and is not a priority of the project. You can read the image files, convert them manually, and replace the image URLs. |
@ellet0 Yeah I write some code to convert the image file in local cache to base64 before user upload rich text to server. But it may be optional feat in |
The #quill_html_editor has other issues that might be blocking for some users (like me). It renders in an iFrame so creates issue for popup and even select box that have overlay over the iFrame. I use successfully flutter_quill_extensions, vsc_quill_delta_to_html, flutter_quill to keep data in HTML (because I use it to send emails), including img in base 64. My method delta to HTML looks like this:
And the cachedImages is a Map that is filled by a custom imageProviderBuilder given in the QuillEditorImageEmbedConfigurations:
and the custom imageProviderBuilder named Base64ImageProvider looks like this (each time a local image is provided, it keeps its base 64 representation in cache):
Hope this helps. |
Is there an existing issue for this?
The question
this is my used packages with flutter_quill_extensions: ^0.7.2
vsc_quill_delta_to_html: ^1.0.3, flutter_quill: ^8.6.4 ,
The text was updated successfully, but these errors were encountered: