I want to use CodeMirror in an application for text annotation (like this
The annotations should be able to overlap and they should be editable (i.e. you can select some text and create an annotation).
As far as I understand, with CM6 I should be able to write a
Plugin that creates corresponding
Decorations. However, I were not able to figure out to register a plugin with an
EditorView from the existing examples.
Is there a minimal example explaining how to register a plugin (or to create decorations without a plugin, if that’s also possible)?