Comment on a text document

Hi I have a document. I want to set comments on a specific part of the text. For commenting I add a span to that part. Before comment:
<p>
Hello this is just an example text
</p>
<p>
Hello this is just an example text
</p>
After comment:
<p>
Hello <span comment-id="258">this is just an</span> example text
</p>
<p>
Hello <span comment-id="258">this is just an</span> example text
</p>
And then I will update the document with this new data. But the problem is I have a user role that can only comment on the text and not update the document data. As you can see my comments are relying on document data because when I add a new comment I need to add a new span element to the document. What is the solution here? What can I do to prevent updating the actual data and just letting the user comment on the text and not be able to update the text because it will be a security issue? What can I do to not let the user change the text between the tags in the backend?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server