quilljs keep stripping classes from anchor tags

You will need to add that element in side of your Quill instance as well, using the Inline class.

Here is an example:

const Inline = Quill.import("blots/inline");


InternalLink.blotName = "internal_link";
InternalLink.className = "btn";
InternalLink.tagName = "A";

Quill.register({
  "attributors/class/link": LinkClass,
  "formats/internal_link": InternalLink
});

Edit Quill removes classes from anchor tags (forked)

I didn’t think the documentation was helpful but here is an example that can help also:

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top