Coloring issue: Define a CodeMirror instance to be CSS without <style> tag

We were using an old version of CodeMirror, and when we defined a CSS textarea, the tags were not required in order to get coloring. Is there a way to strictly define a CodeMirror instance, or any hacks to make it color code without the tags?


Sounds like you are using the htmlmixed mode when you want the css mode.

Thanks for the suggestion. It was set to htmlmixed before, but now it has an attribute of mode=“css”. I am using this plugin called ACF Code Field for Wordpress, and I have 3 other CodeMirror textareas on the same page. Maybe I’ll limit it to just this CSS one, and see if that jogs anything. If it’s supposed to color code without the style tags, then it may be something on my end. Just didn’t know if there was an option I needed to set.

Thanks Marijn!