1

In our CMS system we will add a feature where users can add notes to the existing content. This annotation-like system is to help users each other writing good texts. The system is inspired by the way medium and substance work, but Microsoft Office, Libre Office and Google Drive have the same feature.

The notes itself will be stored in a database, where the notes have an author and can contain some meta-data. However, the notes must be attached to (a selection of) words. In our case we have a very simple HTML WYSIWYG editor, so I was thinking to add some "special" markup to the contents:

<p>Lorem ipsum dolor sit amet, <note ref="4">consectetur</note> adipiscing</p>

And in our database there is a note stored with an identifier 4.

I came up with this method because you can't simply attach it to a string position or something. I am wondering, is this in general the good/best method? What is common to do?

The WYSIWYG editor should not filter out the <note> tag, but in the rendering at the frontend the tag must be removed. Are there options which are smarter than this?

AstroCB
  • 12,337
  • 20
  • 57
  • 73
Jurian Sluiman
  • 13,498
  • 3
  • 67
  • 99

0 Answers0