CKEditor's click event not firing

前端 未结 2 862
不思量自难忘°
不思量自难忘° 2020-12-21 16:09

I am using CKEditor 4.4.3 and trying to listen to an editor\'s click event:

editor.on(\'click\', function (e) {
      console.log(\'click event from attachin         


        
2条回答
  •  时光取名叫无心
    2020-12-21 16:54

    Use attach the event handler to the editor's editable. This needs to be done after the editor is ready:

    editor.on('instanceReady', function (e) {
        editor.editable().on('click', function (event) {
            console.log('clicked');
        });
    });
    

    Fiddle: http://jsfiddle.net/8fZpz/

提交回复
热议问题