下面的解决方案对于一堆事件来说效果很好,但是当我尝试绑定(bind) scroll
时,它不起作用。如果我像这样绑定(bind) scroll
事件并滚动浏览器的窗口(而不是编辑器),那么它会被触发,但如果我在编辑器内滚动它不会:
setup: function(ed){
ed.on('scroll', function() {
console.log('Editor window scrolled!');
});
}
最佳答案
尝试以下操作:
setup: function(ed){
ed.on('init', function() {
$(ed.getWin()).bind('scroll', function(e){
console.log('Editor window scrolled!');
});
});
它对我有用:-)
关于javascript - 无法在tinymce中绑定(bind)滚动事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39586721/