editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

šŸ’”Collaboration comments

Open pimjansen opened this issue 3 years ago • 1 comments

  1. Describe a problem. Person A creates a document which will be reviewed by other people. These people want to add feedback for the author to handle

  2. Describe the solution you'd like. Mockups are welcome.3. See Google docs for example where you can link a comment to some inline text

  3. Are there any alternatives? No

I would love to spend some time to dig into the options however i do not even know if it is feasible structure wise. A solution would be to wrap certain selected text with a comment node as this:

Here is some <comment data-ref=ā€œrandom-idā€>commented text</comment>.

This way you can load the conversation from a backend and put as an overlay on the side or whatsoever. If this is not possible it will be possible as plugin in between but when you cant target text it is a bit useless.

curious about the ideas

pimjansen avatar Aug 04 '22 16:08 pimjansen

Hey!

I'd be interested in the exact same feature. Your proposed solution makes sense to me, but admittedly I just discovered this project because it is used in a different one I am trying to add this same feature - so I have 0 idea about its feasibility. I'll document myself a bit more and come back if I have any update. Subscribed in the meanwhile!

Cheers

gorgeousgeorge avatar Aug 08 '22 14:08 gorgeousgeorge

Think you could create a custom inline tool that does what you're looking for. Effectively start with a copy of the editorjs/link tool: https://github.com/editor-js/link/blob/master/src/index.js And in your case, it'll create a comment tag. Like the link tool, it'll need a form that accepts inputs, in your case comment text and possibly a random UUID / hash ID. It's not a small task, a good few days, but it's doable. Obviously, you'll also need to make sure this tag is disregarded on output. If something is rendering your output HTML, just have it strip comment tags altogether. We actually may be building this for our project in the next few months, if I remember I'll put up a copy of our tool source.

That said, don't think this is a core request, more a new tool. But think you can make something.

[PS: one note, your comment text will likely need to be sans HTML - straight text]

gkovats avatar Feb 13 '23 02:02 gkovats