TinyMCE 和从 Microsoft Word 导入/复制粘贴

发布于 2024-08-02 01:32:07 字数 309 浏览 3 评论 0原文

我正在努力获得有关 TinyMCE 是否支持从 Microsoft Word 粘贴的问题的准确答案。 我想网上可能有很多关于这个主题的过时信息,因为我已经看到了诸如以下的答案:

  1. 您可以安装一个插件以使其正常工作
  2. 您必须使用单独的“从单词粘贴”按钮与粘贴到编辑器中相反,
  3. 它应该开箱即用,
  4. 它根本不起作用(无论你做什么),

我已经测试过这个,它似乎不是开箱即用的(答案#3) )但我不确定这是由于我这边的配置/初始化问题还是需要其他一些外部东西。

任何帮助,将不胜感激。

I am struggling to get an accurate answer on this questions on whether TinyMCE supports pasting from Microsoft word. I guess there may be a lot of out of date information on the web on this topic as I have seen answers such as:

  1. There is a plugin you can install to get it to work
  2. You have to use a separate "paste from word" button as opposed to pasting in the editor
  3. it should work fine out of the box
  4. it doesn't work at all (no matter what you do)

I have tested this and it doesn't seem like it works out of the box (answer #3) but I am not sure if this is due to a configuration / initialization issue on my side or there is some other external thing needed.

Any help would be appreciated.

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

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

发布评论

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

评论(2

我一向站在原地 2024-08-09 01:32:07

它确实有效(而且它可以)。 不过,您将需要使用“从 Word 粘贴”按钮,以便 TinyMCE 可以过滤 Word 添加到其内容中的任何无关标记。 您还必须确保加载 paste 插件(这是默认安装的一部分)。

不过,我相信您需要在主题中显式添加该按钮。 查看 TinyMCE wiki 中的示例

plugins : "paste",
theme_advanced_buttons3_add : "pastetext,pasteword,selectall",

将添加插件和按钮(到您想要的任何一行)。 TinyMCE wiki 声称粘贴默认情况下会进行 Word 过滤,但我从未见过它在没有明确使用“从 Word 粘贴”按钮的情况下在野外工作。

It does indeed work (as well as it can). You will need to use the "paste from Word" button, though, so TinyMCE can filter any of the extraneous markup that Word adds to its content. You'll also have to make sure the paste plugin (which is part of the the default install) is loaded.

I believe that you'll need to explicitly add the button in your theme, though. Take a look at this example from the TinyMCE wiki.

plugins : "paste",
theme_advanced_buttons3_add : "pastetext,pasteword,selectall",

will add the plugin and button (to whichever row you'd like). The TinyMCE wiki claims paste does Word filtering by default, but I've never seen it work in the wild without explicitly using the "paste from Word" button.

同展鸳鸯锦 2024-08-09 01:32:07

对我来说,它无需“从单词粘贴”按钮即可直接粘贴单词中的内容。 我使用的是3.3.9.3

For me it works without "paste from word" button by directly pasting the content from word. I am using 3.3.9.3

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