Overloading plain text: CodeMirror marked ranges

from blog marijnhaverbeke.nl/blog, | ↗ original
One common feature request that CodeMirror version 1 was fundamentally unable to support (due to its reliance on contentEditable), and which was thus built into version 2 from the start, is programmatically styling stretches of text. In version 2, you can call instance.markText(from, to, className), and it'll style that stretch of text with the...