views:

89

answers:

1

I have implemented Codemirror http://marijn.haverbeke.nl/codemirror/ to work as a live text editor within an application and it works perfect.

The only thing I would love to do is create a custom color (e.g. red) for tags used in our system.

We would be using tags like {something here} or {{something here}}

doe anyone know how I can extend codemirror to flag those tags in red?

Thanks a lot for helping out!

+2  A: 

I think you have to implement your own parser resp. extend an existing one.

Manual on how to implement a parser: http://marijn.haverbeke.nl/codemirror/manual.html#writeparser

Jason
thanks, I'm trying to find a somewhat easier option to begin with. Since I'm only looking for one or two tag pairs, it might be possible to add these to an existing parser...?
Jorre
I never wrote a custom parser. But extending an existing one should not be a big deal. The 'parsedummy.js' might be a good starting point since this parser only handles line indentation.
Jason