The CodeMirror editor loads without any errors, but the above code [text* your-name] is still styled as cm-m-xml, is the default xml styling. How can I get it to be styled with say the class cm-m-shortcode ?
‘Tag’, in this context, means HTML tag, not any arbitrary syntax. The htmlmixed mode won’t help you with this (but a custom overlay mode on top of it might).
Somehow in google you are the only one popping up when searching for how to highlight shortcodes with CM
I signed up here just to say this:
I wanted to say thanks for bringing me on the right path.
I think you might find this helpful:
I did not create that on my own - it is freely inspired on a very cool plugin I used to use.
However I thought to share it as it handles ShortCode highlighting very, very well (inclusive nesting, quoting and whatnot)
Thanks again for the hints above because they helped a great deal to understand how CodeMirror even works in the core.