有没有办法防止有人使用javascript从CKEDITOR复制文本?
为了防止粘贴到下面的编辑器中,这对我很有用有没有办法防止有人使用javascript从CKEDITOR复制文本?,javascript,ckeditor,ckeditor4.x,Javascript,Ckeditor,Ckeditor4.x,为了防止粘贴到下面的编辑器中,这对我很有用 window.CKEDITOR.instances.PEGACKEDITOR0.on('paste', function(evt){evt.cancel();}) 类似地,是否有任何方法可以防止有人使用javascript从CKEditor复制文本?对于所有文档,您可以尝试以下方法: <script type="text/javascript"> window.onload = preventing; function pre
window.CKEDITOR.instances.PEGACKEDITOR0.on('paste', function(evt){evt.cancel();})
类似地,是否有任何方法可以防止有人使用javascript从CKEditor复制文本?对于所有文档,您可以尝试以下方法:
<script type="text/javascript"> window.onload = preventing;
function preventing () {
/* Disable right click on web page */
document.onclick("contextmenu",function(e){
return false; });
/* Disable cut, copy and paste on web page */
document.bind('cut copy paste', function (e) {
e.preventDefault(); }); };
</script>
我需要阻止CTRL+C。有什么方法可以阻止它吗?document.bind('copy paste',function(e){e.preventDefault();});
var element = CKEDITOR.document.getById( 'myElement' );
element.on( 'click', function( ev )
{
// The DOM event object is passed by the "data" property.
var domEvent = ev.data;
// Prevent the click to chave any effect in the element.
domEvent.stopPropagation();
})