tinymce cut/paste plugin
I want to call function after cut/paste event fires.
For example I want to count number of characters entered by user when user do cut/paste in editor via keyboard or mouse (with context menu) also.
Is there any way to call our own开发者_如何学Go function after user do cut/paste ?
Yes, this is possible.
Use the paste plugin.
tinyMCE.init({
// General options
//mode:'exact',
mode: "textareas", // none, textareas, exact, ...
theme: "advanced", // also simple available
plugins : "paste",
paste_postprocess : function(pl, o) {
// o.content holds the pasted content o.content.length will give you the number of characters the user entered
alert(o.content.length);
},
精彩评论