quill icon indicating copy to clipboard operation
quill copied to clipboard

className/tagName and blots

Open jmoyers opened this issue 5 years ago • 1 comments

Today I found what I thought was a bug, but after reading a bunch of source I realized that the className and tagName are used as keys to identify blots in some cases. I have several custom block blots which are implemented as container/child pairs similar to code or list. I only had className added to the parent containers, because that was where the styling was applied. This caused the behavior when pressing "enter" inside a newly created block level element (built with formatLine) to switch to the last registered blot for the tag (which was div in this case). Adding a className, even though I'm not using it for any styles, fixed the issue. I assumed as an outside consumer that the blotName was the only thing that needed to uniquely identify a blot.

Is this a documentation hole or a bug? Can I help with either?

jmoyers avatar May 27 '19 23:05 jmoyers

@jmoyers I too found this issue.

anishg-cn avatar Aug 30 '22 16:08 anishg-cn

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide :pray:

quill-bot avatar Apr 17 '24 10:04 quill-bot