changeCursor event not working

39 views
Skip to first unread message

arun...@googlemail.com

unread,
Sep 25, 2021, 7:33:16 PM9/25/21
to Ajax.org Cloud9 Editor (Ace)
Hello,

I am trying to fire changeCursor event but it's not working.

editor.session.selection.on("changeCursor", function(){
   //ToDo
});

Сергей Тяпкин

unread,
Apr 11, 2022, 10:26:28 AM4/11/22
to Ajax.org Cloud9 Editor (Ace)
Do you find the solution already?
Can you share it please. I've got this problem too

воскресенье, 26 сентября 2021 г. в 02:33:16 UTC+3, arun...@googlemail.com:

vanessa....@gmail.com

unread,
Feb 23, 2023, 1:57:54 PM2/23/23
to Ajax.org Cloud9 Editor (Ace)
Just came across your message.
The following worked for me:
// emitting event
this.getAceEditor().session.getSelection()['_emit']('changeCursor');

// listening to event
import { fromEvent } from 'rxjs';
const changeCursor$ = fromEvent(aceEditor.session.getSelection(), 'changeCursor')
Reply all
Reply to author
Forward
0 new messages