quill
quill copied to clipboard
className/tagName and blots
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 I too found this issue.
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: