Skip to content
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 preserve the original style of image? #43

Open
luokelong opened this issue Dec 2, 2023 · 3 comments
Open

How to preserve the original style of image? #43

luokelong opened this issue Dec 2, 2023 · 3 comments

Comments

@luokelong
Copy link

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?

@GlenHeart
Copy link

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

@RaSah673
Copy link

RaSah673 commented Jan 12, 2024

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.

@Brav3Trav3l3r
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants