开发者

CKEditor force paste from word?

开发者 https://www.devze.com 2023-01-17 04:53 出处:网络
I have a application using the CK editor, where users typically paste content from word. When the paste from word function is used, then the content is cleaned properly. The problem is with users not

I have a application using the CK editor, where users typically paste content from word. When the paste from word function is used, then the content is cleaned properly. The problem is with users not using paste from word, then the HTML gets into a state that our application can't clean.

Has anyone found out a way of either forcing using paste from word for word content or automatically开发者_JS百科 apply the logic used when paste from word, even if paste is directly into editor?

I would not like to completely turn off paste into the editor directly, rather I'd like to detect a word paste and then clean the data (as paste from word), or disallowing a paste from word but allowing normal text paste.

I'm using version 3.0.1 CK editor


Figured out that this was included in version 3.1 of CK Editor, then all paste in to normal edit window is passed through the word clean up function.

0

精彩评论

暂无评论...
验证码 换一张
取 消