Sitecore: Forcing pasting as unformatted text

一个人想着一个人 提交于 2019-12-19 04:15:23

问题


Is there a good way to force pasting as text inside Rich Text Fields inside Sitecore? I know there's a "Paste as Text" button in the Rich Text Editor itself, but content authors are almost definitely going to just hit Ctrl+V or Right-Click->Paste to put the text in, and if that content came from Word, all hell breaks loose with the markup. The workaround we have so far is to paste into notepad and then to copy that text and paste it into the Rich Text Field, but that solution is inelegant and I hate it.

Thank you for your time.


回答1:


Take a look at the setting

<property name="StripFormattingOnPaste">None</property>

Located in the file /sitecore/shell/radcontrols/editor/ConfigFile.xml

Last time I had a requirement similar to yours, I went in there and made the change and it worked fine. Should still work, unless they changed something :-)



来源:https://stackoverflow.com/questions/3406415/sitecore-forcing-pasting-as-unformatted-text

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!