Parser 2011/Annotated text

Annotated text separates a stream text from a set of annotations which are applied to various sequences of characters. For instance, rather than

This is some text

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 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.