nozer / quill-delta-to-html

Converts Quill's delta ops to HTML
MIT License
404 stars 95 forks source link

Customize image block #89

Closed jonahfuller closed 3 years ago

jonahfuller commented 4 years ago

Hi there... I've been trying to figure out how to do this and after looking at the source code, I'm not actually sure it's possible, but figured I'd ask here just in case I'm missing something.

In my quill editor, I'm enhancing the built-in image format with a custom image blot that adds some extra attributes, such as srcset, sizes, etc. Because of this, the value of image inserts is being returned from the QuillDeltaToHtmlConverter as [object Object] because the data being stored is not a simple string. Is there a way to customize the converter to be able to handle this, or do I need to create a custom blot type to handle these "enhanced images"?

volser commented 4 years ago

@jonahfuller try customTagAttributes callback