How can I prevent tinyMCE's paste event?

I need to prevent the paste event of tinyMCE if the length of the current content of editor plus the length of the words to be pasted exceed the specified limit. How can I do it? Thank you.


I was wrong. I dont need to prevent or disable paste in tinyMCE to do this. I used their <strong>paste</strong> plugin and modified the content before it is pasted.

function(pl, o) { ... if(len > limit) { o.content = ''; } }


I think it's better to use the paste_preprocess function.

It's a old question, but others may stumble on this problem.

人吐槽 人点赞



用户名: 密码:
验证码: 匿名发表


查看评论:How can I prevent tinyMCE's paste event?