tags:

views:

372

answers:

2

Does anyone know how i can attach an onpaste event in CKEditor 3.x?

I basically want to grab CTRL+V data and add few text to it and then add it to the editor.

I have looked around but have not found a definitive answer. CKEditor forum is of not much help.

Thanks a lot in advance.

+3  A: 

This should do the trick

var editor = CKEDITOR.instances.YourInputControlName;
editor.on('paste', function(evt) {
    // Update the text
    evt.editor.setData(evt.editor.getData() + ' your additional comments.');
}, editor.element.$);
njappboy
A: 

paste event in never fired in IE. Someone have sugestion?

Marco