Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to bind scroll event in tinymce

Tags:

javascript

The solution below works quite well for a bunch of events, but when I am trying to bind scroll, it is not working. If I bind scroll event like this and scroll the browser's window (not editors) then it gets fired, but if I scroll inside editor it doesn't:

setup: function(ed){
    ed.on('scroll', function() {        
      console.log('Editor window scrolled!');       
    });
}

binding event in tinymce

like image 980
Rahul Bisht Avatar asked Nov 18 '25 15:11

Rahul Bisht


1 Answers

Try the following:

setup: function(ed){
    ed.on('init', function() { 
         $(ed.getWin()).bind('scroll', function(e){
            console.log('Editor window scrolled!');
        });
    });

Its work for me :-)

like image 76
Maths RkBala Avatar answered Nov 20 '25 03:11

Maths RkBala