I have code like this in a template that I want to load in a codeMirror textarea.
<div id="wrap">
<p>
<% if ( data ) { %>
<span><%= data %></span>
<% } %>
</p>
</div>
If I set the mime type to text/html or text/javascript it says “Special characters must be escaped [ < ]”. When I set it to text, it works fine, but then I lose the color coding ( which I prefer to keep ).
I never used codeMirror before, and have tried to find a way to deal with this on Google / Stackoverflow / the documentation, but no luck so far.
If anyone can point me in the right direction of the recommended way to deal with this, then that would be great