Tiny Editor имеет плагин, который называется "paste".
При его использовании вы можете определить две функции в разделе init
/**
* This option enables you to modify the pasted content BEFORE it gets
* inserted into the editor.
*/
paste_preprocess : function(plugin, args)
{
//Replace empty styles
args.content = args.content.replace(/<style><\/style>/gi, "");
}
и
/**
* This option enables you to modify the pasted content before it gets inserted
* into the editor ,but after it's been parsed into a DOM structure.
*
* @param plugin
* @param args
*/
paste_postprocess : function(plugin, args) {
var paste_content= args.node.innerHTML;
console.log('Node:');
console.log(args.node);
}