我正在编写一个小代码以在 CKEditor 文档单击事件上运行,但它不起作用。我的代码是,
var element = CKEDITOR.document.getById( 'Editor_TextArea' );
element.on( 'click', function( ev )
{
//mycode
alert('ok');
}
);
谁能帮帮我..
最佳答案
CKEDITOR.document.getById( 'Editor_TextArea' );
没有为我提供任何值..
所以我使用了下面的代码并且效果很好。
CKEDITOR.instances['Editor_TextArea'].on('contentDom', function() {
this.document.on('click', function(event){
//your code
alert('Click Event');
});
});
关于javascript - 如何在CKEditor中使用点击事件..?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11721022/