modmore / CodeMirror

Integration for CodeMirror into MODx Revolution
12 stars 7 forks source link

Does not work with CSS syntax ? #2

Closed phron closed 14 years ago

phron commented 14 years ago

Hello, I use codemirror, it works fine with HTML, JS, or PHP syntax, but not at all with CSS... Is this a bug or a normal behaviour ?

I would be great to have the colored syntax and automatic indent with CSS too...

Thanks Cheers

PS- I have posted this in forum too

splittingred commented 14 years ago

It does, if you encapsulate it in 'style' tags. However, since it has to parse HTML/PHP as well, it will ignore it if you're just doing straight CSS in the editor, since how does it know it's CSS?

phron commented 14 years ago

All right :) I feel a bit stupid now ;)

As I use css in chunks, then use these chunks in resources (type content CSS) I didn't put the "style" tags...

If I want use codemirror with colored syntax and automatic indent, I put the style tags, write my code in my chunk, then I remove the tag...

That way is ok for me...