2014-11-20 135 views
3

如果您有“粘贴”插件,使用Firefox右键单击粘贴,似乎不可能复制文本,然后将其粘贴到TinyMCE编辑器中。为什么是这样?为什么我们不能在Firefox中用粘贴插件右键单击粘贴到TinyMCE中?

我使用:

  • 火狐33.1.1(虽然用户抱怨的问题与FF 29)
  • TinyMCE的4.1.1与 “粘贴” 插件

我可以右击粘贴到这些没有错误:

用户对TinyMCE forum as far back as 2007讨论,并注明说警报“复制/剪切/粘贴在Mozilla和Firefox中不可用“,这是我没有收到的FF 33.没有人提到为什么发生此问题,并且TinyMCE管理员声称”这不是错误“。我很想知道导致这种情况的Firefox或TinyMCE发生了哪些变化,以及为什么(安全性?)。

这个问题 - tinymce mouse paste not working - 有一个如何解决问题的答案:删除“contextarea”插件或基于它的任何插件。但我很有兴趣知道为什么它首先发生。

回答

2

一位同事让我在正确的轨道上,我发现这两个环节:

https://developer.mozilla.org/en-US/Firefox/Releases/29/Site_Compatibility#Security

The removal of allowclipboard policy support broke the copy/paste buttons on some rich text editors like CKEditor. The standard Clipboard API's click-to-copy support will be implemented in the near future. The general keyboard shortcuts, Ctrl+C and Ctrl+V, should always work.

http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard

By default, JavaScript is not allowed to read or set your clipboard data for security and privacy reasons. This is because websites scripts can erase and replace what you currently have in your clipboard (data loss issue) and they can read whatever you have in your clipboard (security and privacy issue); as such, you should grant access with caution.

也许有人与TinyMCE的专业知识可以提供更多信息关于它如何访问剪贴板。

好的后续问题可能是:为什么其他浏览器不这样做?为什么ctrl + v更安全?