codemirror fails when adding </textarea> tag inside it

Posted by Jorre on Stack Overflow See other posts from Stack Overflow or by Jorre
Published on 2010-05-12T08:51:42Z Indexed on 2010/05/12 8:54 UTC
Read the original article Hit count: 320

Filed under:

I'm using codemirror http://marijn.haverbeke.nl/codemirror/ to let users create their own web templates inside a web application.

Codemirror works great, except for the time that users have put a tag inside their source code. When I load that up inside code mirror, it breaks everything in the source code that follows after because it thinks my codemirror text area is closed.

I'm using the following way to launch codemirror:

CodeMirror.fromTextArea('code')

It works great on my existing textarea "code" except when users add inside their templates (in the codemirror textarea).

Any help is much appreciated!

© Stack Overflow or respective owner

Related posts about syntax-highlighting