CodeMirror markText is not working
问题 I am using CodeMirror like this to show some XML response to User. HTML CODE <body> <textarea id="cm" >#{bean.xmlResponse}</textarea> </body> JS CODE window.onload = function () { var editor = CodeMirror.fromTextArea(document.getElementById('cm'), { mode: "xml", theme: "default" }); editor.getDoc().markText({line:5,ch:2},{line:5,ch:9},"color : red"); }; Now when I am trying to highlight some particular line by using markText which is not working. Of course "xml" mode is working but line 5 is