I've searched Google and these forums without luck. Here's my code where the error appears to be originating. Digging around in the source file is no help. This is installed on a Multi-Site WordPress and works with posts etc in admin area. All the sites are throwing this error when in post etc.
var editor = CodeMirror.fromTextArea(
document.getElementById("code"), {
lineNumbers: true,
mode: "text/x-scss",
theme: "solarized light",
lineWrapping: true,
onCursorActivity: function() {
editor.setLineClass(hlLine, null, null);
hlLine = editor.setLineClass(editor.getCursor().line, null, "activeline"); }
});
var hlLine = editor.addLineClass(0, "background", "activeline");
editor.on("cursorActivity", function() {
var cur = editor.getLineHandle(editor.getCursor().line);
if (cur != hlLine) {
editor.removeLineClass(hlLine, "background", "activeline");
hlLine = editor.addLineClass(cur, "background", "activeline");
}
});
var number = jQuery(".CodeMirror-wrap").length;
if(number > 1){
jQuery(".CodeMirror-wrap").hide();
jQuery(".CodeMirror-wrap:first").show();
}
Any insight is greatly appreciated.