如何在CKEditor中使用点击事件..?

Ram*_*esh 3 javascript click ckeditor

我正在编写一个小代码来运行CKEditor文档点击事件,但它不起作用.我的代码是,

var element = CKEDITOR.document.getById( 'Editor_TextArea' );
element.on( 'click', function( ev )
{
//mycode
   alert('ok');
  }
  );
Run Code Online (Sandbox Code Playgroud)

谁能帮我..

Ram*_*esh 12

CKEDITOR.document.getById( 'Editor_TextArea' );不是给我任何价值的..所以我使用下面的代码,它的效果很好.

CKEDITOR.instances['Editor_TextArea'].on('contentDom', function() {
    this.document.on('click', function(event){
         //your code
         alert('Click Event');
     });
});
Run Code Online (Sandbox Code Playgroud)