Is there a programmatic way to hide the cursor in Ace Editor?

Here's what suggested answers do, for visual comparison:

Here's what it looked like before:

enter image description here

adding:

editor.setOptions({readOnly: true, highlightActiveLine: false, highlightGutterLine: false});

as suggested by "a user", removes the gutter and line highlight, but the cursor is still there:

enter image description here

then adding the line:

editor.renderer.$cursorLayer.element.style.display = "none"

as suggested by "daronwolff" removes the cursor:

enter image description here


You can hide cursorLayer by using

editor.renderer.$cursorLayer.element.style.display = "none"

Tags:

Ace Editor