I’d like to be able to create overlapping text annotations (as in the image above). I have tried using the
Decoration.mark from Codemirror 6, but on account of all the overlapping decorations ending up as classes on the same dom elements, I can’t create separate and overlapping styles (like the underlines and highlights above). Is what I’m looking for possible with Replace Decorations or Widget Decorations? Or some other way? I would like the text to still be editable and would like to retain the ability for the annotation to span multiple lines.
I’m happy to use Codemirror 5 or 6 to implement the extension/addon necessary. But I could use some direction on what the primitives to start with.
Best regards and thanks in advance for your help!