Rahul Bisht
Rahul Bisht

Reputation: 144

Unable to bind scroll event in tinymce

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

Upvotes: 3

Views: 880

Answers (1)

Maths RkBala
Maths RkBala

Reputation: 2195

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 :-)

Upvotes: 3

Related Questions