quill-blot-formatter icon indicating copy to clipboard operation
quill-blot-formatter copied to clipboard

How to preserve the original style of image?

Open luokelong opened this issue 1 year ago • 3 comments

While using quill.setContents(quill.clipboard.convert(value)) to set editor conent, the module will remove its style attribute.

Some html string like:

<p><img src="..." style="display:block;margin:0 auto;" /></p>

After setContents it will to be:

<p><img src="..." /></p>

But I hope it can preserve the style attribute and show its real align.

How to impl this feature?

luokelong avatar Dec 02 '23 15:12 luokelong

这个怎么触发那个eitor 的change 事件啊

GlenHeart avatar Dec 13 '23 08:12 GlenHeart

I am having similar issue with a bit difference: after saving the resized image, the image sizes are stored in the database, and is rendered in resized form, however, in the quill editor (react-quill), the image is seen again in its original big size. If the editor content re-saved, the image is stored in the original size but not in the previously-resized form, meaning that every time you have to resize the image to the desired size if you update something in the quill editor.

RaSah673 avatar Jan 12 '24 00:01 RaSah673

Hey, facing the same issue. Anyone have solution for this?

Brav3Trav3l3r avatar Jun 11 '24 14:06 Brav3Trav3l3r