Sidebar Test
When a comment is created and associated with a specific paragraph in the wikitext of the individual page, a hook like <sb:xxxxx> is inserted in the text,[1] where xxxxxx points to the sidebar revision ID tag used to retrieve the sidebar text for rendering on the displayed page. (The xxxxxx may be replaced with a user provided text which is actually linked to the equivalent of the sidebar-rev_text_id).
The mediawiki extension Cite is a model of how inline text is rendered elsewhere in the page. There is also a discussion of how Cite is rendered in visual editor which may give some insight into managing sidebar comments within VisualEditor.
We may want to be in communication with the Wikimedia} staff in charge of [https://www.mediawiki.org/wiki/Parsoid parsing and VisualEditor since we want our extensions to work with both.
- ↑ This is the comment. But instead of appearing as a reference at the bottom of the page, <sb> and </sb> bracket the text to appear as a sidebar comment next to the paragraph in which it is contained.