Commenting parts of a blog post or document with jquery
<p>I am interested in making an addon to an existing site where there is a system where users can post information, sort of like a blog post, and then regular comments like you see on any page are shown below the content of the post.</p>

<p>However I have been considering using something like this <a href="http://www.electrictoolbox.com/jquery-modify-right-click-menu/" rel="nofollow">http://www.electrictoolbox.com/jquery-modify-right-click-menu/</a></p>

<p>In order to make a custom dropdown menu where users can right click and comment that section of the page. What would be even better is if I could make it so that a user can highlight a section of text and then add a comment for that section. When another user then views the page he/she will see a highlighted block for the part of the content which the comment references to.</p>

<p>What i need help with is the highlighting part to activate a comment and how I would know what part the user is commenting. Or a way of knowing where the right click is done and then showing the comment box.</p>

<p>Some alternatives I have thought of is sending the highlighted part via post to a php file that then parses the content and updates the right area with the highlight, however this could cause conflicts for content which is the same. Another is of course to make each line of the content its own span or something where the id could be used to match the right row and highlight it, however the highlight and comment is a much better approach for me. </p>

<p>Anyone know if there are any existing examples of how to go about doing this?</p>
