how to convert the flutter_quill textData with images into html with encoding the images into base64
Is there an existing issue for this?
- [X] I have searched the existing issues
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 ,
Hi, there is already a package called quill_html_converter it uses vsc_quill_delta_to_html to convert the delta to HTML but the converting back from HTML to delta is experimental
@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.
I haven't tested it, but it's just a long string and should be able to store it in the < img > image source
The question doesn't provide the details I needed.
For example, should we convert the images that's stored locally or on the network and then download it to convert it to base 64 in order to use it in the conversion process into Html?? Or maybe he meant an image that's is already base 64 in the quill delta
Html support is out of scope for now.
The source code is not in the best state.
@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 flutter_quill_extensions.An other package quill_html_editor can covert image to base64 just select them.