quill-html-edit-button icon indicating copy to clipboard operation
quill-html-edit-button copied to clipboard

Tags attributes are not saved

Open ITSFerroli opened this issue 1 year ago • 5 comments

When I try to insert an attribute (such as id, class, style, etc.) into a tag, it doesn't get saved.

ITSFerroli avatar Aug 27 '24 08:08 ITSFerroli

Same problem here.

First time using Quill and this module, so I don't know if is a bug or a feature....

lapega avatar Nov 27 '24 15:11 lapega

This plugin is only minimally useful. To be honest I'm not even sure it is useful, try editing anything here and you'll see it just doesn't work.

https://benwinding.github.io/quill-html-edit-button/javascript/

I was able to just manually fix HTML in the RTE by using inspect element, which is less than ideal, of course.

VaelVictus avatar Feb 02 '25 17:02 VaelVictus

So to clarify, this plugin only allows you to edit quill compatible HTML unfortunately, as whatever HTML you add gets parsed by quill when you click save

This means you can't add random inline css, javascript, random HTML attributes etc... quill will strip that out

benwinding avatar Feb 02 '25 22:02 benwinding

Ah, bummer -- I don't suppose there's any way to not have quill parse the HTML? To "shotgun" the problem somehow, at the developer's risk. Thank you for the reply.

VaelVictus avatar Feb 03 '25 02:02 VaelVictus

Hi @VaelVictus

Here's the code that adds the HTML back into Quill in this plugin

https://github.com/benwinding/quill-html-edit-button/blob/8c3c63914bd503bf50ac38aac8901f0295143a52/src/quill.htmlEditButton.ts#L39-L41

You might be able to modify this library to do what you want

benwinding avatar Feb 03 '25 06:02 benwinding