清理从 MS Word 粘贴的内容

发布于 2024-07-15 19:18:48 字数 353 浏览 1 评论 0原文

我正在寻找一种服务器端 (C#) 方法来清理从 MS Word 粘贴的内容。 我知道很多富文本编辑器(例如 FCKEdit)都内置了此功能,但我想在后端处理它,以使其对用户尽可能无缝。

Jeff 发布了执行此操作的方法

http://www.codinghorror.com/blog/archives/000485.html

但那已经三年多了。 有没有更好的方法来做到这一点?

I'm looking for a server-side (C#) approach to cleaning up content pasted from MS Word. I know that a lot of the Rich Text Editors like FCKEdit have this ability built in, but I'd like to handle it on the backend to make it as seamless as possible to the user.

Jeff posted an approach to doing this

http://www.codinghorror.com/blog/archives/000485.html

but that's over three years old. Are there any better approaches to doing this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

扎心 2024-07-22 19:18:48

Having had to deal with similar things in the past (and generally stuck with the editor's built in options), I'd say that Jeff's regex collection looks about right - I've not tested it, but it seems to cover most of the weird markup (all the <o:p> type tags for example) that word adds.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文