Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ace editor selects an entire line by default

Tags:

ace-editor

Ace editor by default selects an entire line..

For eg: When the page loads up the first line is selected by default.

Also when I click anywhere in the screen that entire line gets selected..

How can I disable this feature..

Thanks in advance

like image 791
user1767544 Avatar asked Nov 02 '13 04:11

user1767544


2 Answers

Are you sure it's selection and not active line highlight? try doing

editor.setOption("highlightActiveLine", false)
like image 149
a user Avatar answered Sep 24 '22 00:09

a user


With the latest version of ace you should use the following method.

editor.setHighlightActiveLine(false);

http://ace.c9.io/api/editor.html#Editor.setHighlightActiveLine

like image 39
Lawrence Cherone Avatar answered Sep 27 '22 00:09

Lawrence Cherone