Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"After paste" event in CkEditor

Is it possible to intercept an event that is fired after pasting something in CkEditor?

I know that it's possible to use the paste event, that is fired before that some content is inserted in the editor; what I'm looking for is an event that is fired after inserting contents.

like image 869
Vito Gentile Avatar asked Feb 15 '23 04:02

Vito Gentile


1 Answers

I found the solution in this page of the official forum of CkEditor.

The event I was looking for is provided by the framework, and it is called afterPaste.

You can use it as the following example shows:

editor.on('afterPaste', function (event) {
    //Do what you want
});
like image 90
Vito Gentile Avatar answered Feb 17 '23 02:02

Vito Gentile