If you do markText
with option collapsed=true
(with replacedWith
), and place the cursor just before the arrows marking collapsed range, the cursor won't be showing.
Example code (part above the empty line run once, markText
to test range, clear
to remove mark):
var text = document.createTextNode('\u2194');
widget = document.createElement("span");
widget.appendChild(text);
widget.className = "CodeMirror-foldmarker";
var editor = $(".CodeMirror")
editor[0].CodeMirror.doc.markText({line:0,ch:1},{line:1,ch:10},{collapsed:true,replacedWith:widget})
editor[0].CodeMirror.getAllMarks()[0].clear()
pl.wikipedia.org