简体   繁体   English

在Firefox和Chrome浏览器的CKEditor中禁用了剪切,复制和粘贴功能。 解决方法?

[英]Disabled cut, copy & paste functions in CKEditor with Firefox and Chrome. Workaround?

As you can easily test yourself on http://ckeditor.com/demo (v. 4.4.3), the cut, copy and paste functions by means of the buttons and context menu are disabled (ie actively blocked) in Firefox(30) and Chrome(35). 您可以在http://ckeditor.com/demo(v.4.3.3 )上轻松进行测试,因此在Firefox中禁用了通过按钮和上下文菜单进行的剪切,复制和粘贴功能(即已主动阻止)(30 )和Chrome(35)。 This has also been the case with earlier versions of the browsers and of (F)CKEditor. 浏览器和(F)CKEditor的早期版本也是如此。 With other form text area editors (which CKEditor actually is), the said functions work perfectly well in the two browsers. 与其他表单文本区域编辑器(实际上是CKEditor)一起使用时,上述功能在两种浏览器中均能很好地工作。 And with Internet Explorer it has never been a problem, at least up to 9 (cannot test > 9 now). 借助Internet Explorer,这从来就不是问题,至少可以解决9个问题(现在不能测试> 9)。

I've gone through the whole documentation and the CKEditor forums, including the developers/bug report site, but no solution or work-around is offered. 我已经浏览了整个文档和CKEditor论坛,包括开发人员/错误报告站点,但没有提供解决方案或解决方法。 Does anyone know one? 有人认识吗? It would preferably have to be one that is Javascript-based, because I think it is a poor show if we have to ask the users to configure their FF/Chrome to use the editor in a normal way. 最好是基于Javascript的脚本,因为我认为如果我们不得不要求用户配置其FF / Chrome以常规方式使用编辑器,这是一个糟糕的展示。 If that would be possible at all. 如果那完全有可能。

Direct access to clipboard or forcing paste is yet impossible on other browsers than IE. 除了IE之外,在其他浏览器上也无法直接访问剪贴板或强制粘贴。 On IE user must accept a security alert to allow this. 在IE上,用户必须接受安全警报才能允许此操作。

If you've ever seen an editor being able to drag content from the clipboard, I suppose it was a Flash or Java solution (entire editor or just the clipboard access). 如果您曾经见过编辑器能够从剪贴板中拖动内容,那么我想这是Flash或Java解决方案(整个编辑器或剪贴板访问权限)。 I know of nothing in JavaScript that could help. 我对JavaScript毫无帮助。

Fortunately, situation will change in the future, because a solution is being standardised at the moment. 幸运的是,由于当前解决方案正在标准化,因此情况将来会改变。 Application will be able to fire paste event from a semi-trusted event. 应用程序将能够触发来自半信任事件的粘贴事件。 We have to wait a year or two, though. 但是,我们必须等待一两年。

I'm using IE11 and have no problem with pasting in-- with Chrome, it pops up a window that claims I can use ctl-V to do it manually, which works with text but given I'm often trying to paste in an image, nothing occurs at all when I try that. 我正在使用IE11,并且在粘贴时没有问题-在Chrome中,它会弹出一个窗口,声称我可以使用ctl-V手动完成此操作,该操作适用于文本,但是鉴于我经常尝试粘贴到图片,当我尝试时什么也没有发生。 My solution-- recommend users use IE. 我的解决方案-建议用户使用IE。 My recommendation to browser developers-- if your security solution requires breaking the user's workflow, they will exert far more effort finding a workaround for the problem than they ever would conforming to complicated security procedures. 我向浏览器开发人员的建议-如果您的安全解决方案需要中断用户的工作流程,那么他们将比以往遵循复杂的安全过程花费更多的精力来找到解决该问题的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM