This algorithm that I recommend depends on maintaining the data model for the operations in your database and using that model to generate the interfaces and the links in the reading mode of the document, rather than allowing direct editing of the main document. A link-based approach in the rendered (not editing) view allows someone to participate in the comment workflow without actually letting them edit the main document directly; you can just use textareas or input fields in the popover or new page-based form for these interactions. I've used this approach for department-wide reviews.
Clicking on a paragraph may not be an obvious behavior for new users. When you generate the id for a comment-worthy component (be it paragraph, list item, blockquote, or such), consider adding a superscripted link at the end with a clear label or icon that invites clicking for interaction. Then either pop over a window with your form, or open a new page (depending on accessibility preferences) to accept that input, keyed to that generated id. You'll have to index that stored comment by the document id and the corresponding component id.
For rendering the comments, when a component has a new comment, you can add a new "see comments"-style link following that original "comment here" link; again, this added link can either pop up a window with the dialog (since it could be one or more contributors) keyed to that component, or link to endnote-style comments displayed conventionally beneath the document. Extra credit for adding disposition controls within each component's group of comments that track how you have used or dismissed the suggestions!
How do you keep all this review interfacing separate from the clean document content itself? For HTML source, I'd keep just the id/name attribute on the components themselves and add the review links at display time based on walking the document tree and applying the links into the DOM before the rendition. I typically have an XML-based source so I use an XSLT template to recognize these nodes and add the markup during the conversion into the HTML result tree. Either way, your original source remains free of comment/review markup except when it is in a view that you intend to allow commenting in. You can turn off this added step when the review is over or when commenting is closed.