Parser 2011/Annotated text
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. |
Annotated text separates a stream text from a set of annotations which are applied to various sequences of characters. For instance, rather than
This <i>is <b>some</b> text</i>
in annotated text that might be
[ [ [ 'italic', 5, 14 ], [ 'bold', 8, 11 ] ], 'This is some text' ]
People who did both Google Wave and Etherpad have found that this has advantages for a real-time collaborative editor based on w:Operational transformation since it's easier to compute the result of various edits received out-of-order. Annotations are always finite in size, and can even overlap—although to render in HTML, they must be broken into nodes and subnodes.
Others assert that annotated text is difficult to reconcile with an inherently hierarchical model such as wikitext. Etherpad and Google Wave drastically limited their feature set so there is no real hierarchy, just text with various annotations.