Is there any API to set cursor position?
It's possible to somehow set cursor position based on clientX and
clientY data?
editor.getSession().getSelection().selectionLead.setPosition(2,3);
What about editor.moveCursorTo() and moveCursorToPosition()?
--
Juliusz Gonera
http://juliuszgonera.com/
Phrogz wrote:
> On Monday, February 6, 2012 5:30:08 AM UTC-7, d3rek wrote:
> > Is there any API to set cursor position?
> Does not appear to be, based on the source for selection.js
> <https://github.com/ajaxorg/ace/blob/master/lib/ace/selection.js>.
What about editor.moveCursorTo() and moveCursorToPosition()?
>It's possible to somehow set cursor position based on clientX and clientY data?
there is editor.renderer.screenToTextCoordinates to get row,column
from pageX,pageY