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.

Answer1:

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 = ''; } }

Answer2:

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

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

人吐槽 人点赞

Recommend

Comment

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

你可以使用这些语言

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