Hello Guys,
Yesterday downloaded CKEditor and what a beauty.
However, I want to create a function where I need to get the HTML of a paste event before it is beeing pasted. I want to limit the paste functionality to certain images so I want to cancel the paste event if the pasted item is not an image.
I am able to get the pasted html after it has been pasted by this:
CKEDITOR.on('instanceReady', function (ev) {
setTimeout(function () {
console.debug(ev.editor.getSelection().getSelectedElement().$);
100);
});
But then it is already pasted, so I cant cancel it anymore if I want to prevent pasting.

See the editor#paste event.
See the editor#paste event. You can cancel it if you want to block pasting:
editor.on( 'paste', function( evt ) { if ( !checkImage( evt.data.dataValue ) ) evt.cancel(); } );Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Is this also possible for the
Is this also possible for the drop event? Like when you drop images from outside to inside the editor?