quill icon indicating copy to clipboard operation
quill copied to clipboard

Custom Blot to add comments above the text

Open carloseustaquio opened this issue 3 years ago • 1 comments
trafficstars

I'm trying to implement a custom Blot to support the functionality of adding small notes on top of words.

image

I believe that I should extend the Inline class to do so, but just by reading the documentation I'm not sure which method should I override. The approach that I'm trying to use is setting every letter as a tag (with a different id) and then use event listeners to handle clicks to add new content to the tag. Could anyone give a clue on which method I should override to do so? Maybe that would be the static create()?

carloseustaquio avatar Apr 23 '22 18:04 carloseustaquio

const CommentAttribute = new Attributor('comment', 'comment-id', {scope: Scope.INLINE_ATTRIBUTE); quill.formatText(range, { 'comment': 'xxx' }, Quill.sources.USER); and create a comment:{id:'xxx', content: 'a little...', ...} in database op to html: <span comment-id="xxx">quoted text</span> hover the quoted text , search comment content "a little ..." from server by the id 'xxx'

regnoh avatar Jun 10 '22 02:06 regnoh

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