Which API for nested styles

Hi, I am new with CM, and I find API Doc not detailed enough, so it is difficult to me to choose the best way to use it.

I see that when you use Modes it will style your text in sequential way.
What I need instead is to apply styles in nested way (wrapped one in another).

What is the best way to do it?


If you want actual nested DOM elements, that isn’t something the library supports.

I think you might be looking for the multiplex add-on: https://codemirror.net/doc/manual.html#addon_multiplex