如何处理 Word 中的文本复制/粘贴

发布于 2024-09-14 05:57:53 字数 234 浏览 2 评论 0原文

我们有一个文本框,用户将在其中输入评论。他们应该能够执行简单的格式化操作,例如粗体、斜体、列表、标题等...我们的问题是,我们的大多数用户很可能会在 MS Word 中创建评论,然后将文本复制/粘贴到我们的表单中。如您所知,这可能(并且大部分会)在显示数据时导致问题。从 Word 复制/粘贴时提供简单的格式设置功能而不出现问题的最佳方法是什么?

最好的解决方案是某种类型的过滤器,它从 Word 中获取文本并删除所有不需要或非法的内容。

We have a textbox where users will be entering reviews. They should be able to do simple formatting things like bold, italics, lists, headers, etc... Our problem is that the majority of our users will most likely create their reviews in MS Word then copy/paste the text to our form. As you know, this can (and mostly will) cause problems when displaying the data. What is the best way to provide the simple formatting functionality without having problems when they copy/paste from Word?

The best solution would be some type of filter that takes text from Word and strips out everything unneeded or illegal.

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

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

发布评论

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

评论(1

太阳哥哥 2024-09-21 05:57:53

您可以编写一个外接程序,公开一个带有文本“复制以供审阅”的按钮。您的加载项将完成您想要的所有清理工作。

You could write an add-in that exposes a single button with the text "Copy for Review". Your add-in would do all the cleanup that you'd want.

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