在 WYSIWYG 编辑器中粘贴 Microsoft Excel 数据时删除不需要的标签的方法

发布于 2024-10-08 13:30:34 字数 166 浏览 0 评论 0原文

当您从 Microsoft Excel 复制数据然后粘贴到所见即所得时,它包含许多不常见的属性。 而我们现有的所见即所得没有任何功能来删除 Excel 数据的那些不必要的属性。我知道有很多所见即所得编辑器支持此功能。

但如何在我们现有的所见即所得编辑器中轻松实现该功能呢?

太感谢了。

While you copy data from Microsoft Excel and then paste into WYSIWYG, it contains lot of non-common attributes.
And our existing WYSIWYG does not have any feature to remove those unnecessary attributes of that excel data. I know there are many WYSIWYG Editors which support this feature.

But how can I implement that feature in our existing WYSIWYG editor in an easy step?

Thank you so much.

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

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

发布评论

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

评论(1

王权女流氓 2024-10-15 13:30:34

最简单的步骤是使用现有的所见即所得编辑器,例如 TinyMCE 或 CKEditor。如果做不到这一点,我会查看其中任何一个的源代码,看看它们粘贴的 HTML 清理功能是如何工作的。两者都采用了一种技巧,将粘贴重定向到屏幕外的元素,然后在将粘贴的内容插入编辑器的主编辑窗格之前对其进行清理。

The easiest step of all would be to use an existing WYSIWYG editor, such as TinyMCE or CKEditor. Failing that, I'd look at the source code of either of those to see how their pasted HTML cleaning functionality works. Both employ a trick to redirect a paste into an off-screen element where the pasted content is then cleaned before being inserted into the editor's main edit pane.

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