Thanks a lot. The problem I am having with this solution is that it will only work if the editor is clicked within where there is text. That means that if there's just a few words in the editor box, and you click say 3/4th of the way down, it will not fire the event. Is there a way to catch events on all of the editor's input box by any chance?
Re: Attach ondrop event to the editor?
E.g.
CKEDITOR.instances.editor1.document.getBody().on( 'click', function() { console.log( 1 ); } );Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Attach ondrop event to the editor?
Thanks a lot. The problem I am having with this solution is that it will only work if the editor is clicked within where there is text. That means that if there's just a few words in the editor box, and you click say 3/4th of the way down, it will not fire the event. Is there a way to catch events on all of the editor's input box by any chance?
Re: Attach ondrop event to the editor?
CKEDITOR.instances.editor1.document.getDocumentElement().on( 'click', function() { console.log( 1 ); } );"getDocumentElement" returns the html element, which covers entire editable. Body usually has height of the text only.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Attach ondrop event to the editor?
Very cool. Thanks a lot.