当我们从Word文件粘贴文本时,如何删除来自FCKEditor的弹出消息

发布于 2024-10-03 07:10:25 字数 379 浏览 0 评论 0原文


我正在使用 FCK 编辑器,当我尝试在编辑器中粘贴 Word 中的一些代码时,我收到一些弹出消息,如下所示:-

1)“由于您的浏览器安全设置,编辑器无法访问您的您需要直接将剪贴板数据粘贴到此窗口中。
请使用键盘 (Ctrl+V) 粘贴到以下框中,然后单击“确定”。"

2) "您要粘贴的文本似乎是从 Word 复制的。您想在粘贴之前清理它吗?”

这两条消息显示在两台不同的计算机上。

我不想要这两个弹出窗口。我希望允许用户从 word 中粘贴文本而不需要这些弹出窗口。

请为我提供一个解决此问题的解决方案,以便我也可以从 Word 文件粘贴文本。

提前致谢。

I am using FCK Editor and when I try to paste some code from word in the editor, I get some pop up messages as follows:-

1)"Because of your browser security settings,the editor is not able to access your clipboard data directly. You are required to paste it again in this window.
Please paste inside the following box using the keyboard (Ctrl+V) and hit OK."

2) "The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?"

These two messages are displayed on two different machines.

I don't want both these popups. I want to allow user to paste text from word without these popups

Please provide me a solution to resolve this issue, so that I can paste text from word files also.

Thanks in advance.

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

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

发布评论

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

评论(2

千秋岁 2024-10-10 07:10:25

这些弹出窗口的存在是有原因的。在 JavaScript 中从剪贴板获取内容通常是不可能的,因此基于浏览器的富文本编辑器必须尽力解决这个问题。我知道 CKEditor(FCKeditor 的替代品)使用了一种技巧,将用户粘贴重定向到屏幕外元素,这使编辑器可以在将粘贴的内容插入编辑器之前访问该内容;我认为这个技巧可能无法在FCKeditor中实现,所以你可能要考虑尝试CKEditor。

These pop-ups are there for a reason. Getting content from the clipboard is rightly generally impossible in JavaScript so browser-based rich text editors have to work round this as best they can. I know that CKEditor (FCKeditor's replacement) uses a trick that redirects a user paste to an offscreen element, which gives the editor access to pasted content before it's inserted into the editor; I think this trick may not be implemented in FCKeditor, so you may want to consider trying CKEditor.

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