Search code examples
javascriptrichtextboxace-editor

How do I attach a scroll event to Ace Editor?


I am using the Javascript Rich Text Editor, ACE Editor. I have managed to get most of what I need to do accomplished, but I need to attach a scroll event to the editor.

How do I do that? The API says to use the ScrollBar (http://ajaxorg.github.io/ace/#nav=api&api=scrollbar), but I cannot figure out how to use it!

If anyone can point me in the right direction, it would be greatly appreciated!


Solution

  • There are changeScrollTop and changeScrollLeft events emitted from editor.session They are used by the editor here