使用 this.editor.markText({line:0, ch: 0}, {line: 1, ch: 9}, {className: "errorHighlight"});
得到的结果如下:
我想换行高亮时高亮一整行,也就是第一行一直高亮到行尾,如何做到?
我使用ACE可以用this.editor.getSession().addMarker(range,"errorHighlight", "line", false);
实现整行高亮, 不知道CodeMirror如何实现。