Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 textarea 上有一个 tinyMCE 编辑器。我经常使用 word 中的粘贴按钮,当我从 word 中重新粘贴时,我想清除编辑器的内容。
你知道如何做到这一点。
我找到了解决方案。在初始化 tinyMCE 时,我对 paste_postprocess 进行了验证:
paste_postprocess : function(pl, o) { // Content string containing the HTML from the clipboard tinyMCE.activeEditor.setContent(''); return tinymce.dom.Event.cancel(pl); }