The original error code is as follows:
The reason for the error should be that P in IE7 and IE8 does not support innerHTML. The author of CodeMirror also discovered this problem. Related links:
https://github.com/marijnh/CodeMirror2/issues/215 https://github.com/ marijnh/CodeMirror2/commit/4886415d6054571f92fa4d5601ebe7d601e952ab
try { stringWidth("x"); }
catch (e) {
if (e.message.match(/runtime/i) || e.message.match(/runtime/i) )
e = new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)");
throw e;
}
Throw the textarea outside Change the p of the layer to div and it will work fine:
< ;div style="margin-top:0;">