I am working on a user driven cms site.  Think of it like stack overflow.  The users can write posts, and publish them to the web.  I am using a WSGI editor to generate the content.One of the features I am implementing is the ability for users to comment on particular section of a user post. I am trying to think of a clean way to implement this feature.My current plan is to customize the WYSIWYG editor to generate a unique id per <p> and then store the comments separately, and when the page loads also read the comments and do some jquery magic. All users that are going to be generating content will be admin users, so I am not afraid of someone messing around with ids.This is one approach I have found, but I was hoping to either get some feedback or alternative ways to accomplish what I need.  Another thing I am trying to figure out is how I can handle a user editing a post that has been commented on... 
WYSIWYG Editor - Inline Comments
grails;wysiwyg