Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#9196 closed Task (invalid)

need to remove paste in ck editor

Reported by: srikanth pachava Owned by:
Priority: Normal Milestone:
Component: General Version: 3.6.4
Keywords: Cc:

Description

i need to remove paste option completely, please let me know where i need to edit the js code.

Attachments (3)

ckeditor_paste.doc (116.5 KB) - added by srikanth pachava 7 years ago.
ckeditor.js (366.9 KB) - added by srikanth pachava 7 years ago.
config.js (590 bytes) - added by srikanth pachava 7 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 7 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

Context menu can be removed with following command placed in config.js config.removePlugins='contextmenu'; or in CKEditor configuration objecy directly on HTML page var editor = CKEDITOR.replace( 'editor1',{removePlugins: 'contextmenu'});

Unfortunately because of a bug in 3.6.4 it is not possible to remove CKEditor contextmenu. I have provided a quick fix in #9195

You can either download trunk for CKEditor, apply this patch and build new release or if you are not familiar with it you can make changes directly in ckeditor.js file.

Just open ckeditor.js file, Find j.tabletools={requires:['table','dialog','contextmenu'] and change it to j.tabletools={requires:['table','dialog'] // just remove ,'contextmenu'

Please note that config.removePlugins='contextmenu'; removes whole context menu. If you only want to remove paste option you would have to change context menu plugin.

Last edited 7 years ago by Jakub Ś (previous) (diff)

comment:2 Changed 7 years ago by srikanth pachava

i tried that way it is not working. i disabled the key stokes. i had checked that still paste option is working through the right click.

comment:3 Changed 7 years ago by srikanth pachava

more over i downloaded the latest version.

comment:4 Changed 7 years ago by Jakub Ś

This is not in latest CKEditor 3.6.4. It was fixed on trunk.

Like I said this can be fixed in SVN version which can be used to build new version or can be fixed in ckeditor.js directly. Then config.removePlugins='contextmenu'; will work.

Changed 7 years ago by srikanth pachava

Attachment: ckeditor_paste.doc added

comment:5 Changed 7 years ago by srikanth pachava

i had place remove pulgin in ckeditor.js, added ckeditor.shift+f10 in config.js to key disabled function. but still getting the paste option which i had attached, you can check. is there any way to disable mouse right click option.

comment:6 Changed 7 years ago by srikanth pachava

context menu has been disabled but when i right clik then i am getting the paste screen shot is shared.

comment:7 Changed 7 years ago by Jakub Ś

i had place remove pulgin in ckeditor.js,

What?

First of all:

  • Please download CKEditor from - http://nightly.ckeditor.com/. The current nightly version is 7995
  • or download SVN version of CKEditor and build your own release (You should update to rev. [7995]).
  • or download CKEditor 3.6.4 and open ckeditor.js file, Find j.tabletools={requires:['table','dialog','contextmenu'] and change it to j.tabletools={requires:['table','dialog'] , just remove ,'contextmenu' part.

Now as a second step you can use removePlugins option:

  • You place config.removePlugins='contextmenu'; in config.js
  • but if you are using any configration objects on page where CKEditor is installed then you should place the remove plugin option there E.g.
var html = '';
var config = {removePlugins : 'contextmenu'};
var editor = CKEDITOR.appendTo( 'editor', config, html );

I don't think it can be better described than that.

comment:8 Changed 7 years ago by srikanth pachava

thanks for the update i disabled the paste option in the context menu itself. when i right click there will be no paste. instead of paste it shows copy option.

comment:9 Changed 7 years ago by Jakub Ś

Option config.removePlugins='contextmenu'; removes whole context menu. If you had done it right you wouldn't see any CKEditor menu but browsers context menu.

Perhaps you haven't refreshed browser cache.

comment:10 Changed 7 years ago by srikanth pachava

yes, i observed that it removes only conteext menu not the browsers context menu and i kept the automatically delete cookies on exit of browser.

comment:11 Changed 7 years ago by Jakub Ś

yes, i observed that it removes only conteext menu not the browsers context menu

Just to let you know this is how it works. Browser menu is one thing and CKEditor menu is another. The above option is designed for CKEditor only and it does not interfere in browser behaviour. If you want to remove context menu in particular browser as well you will have to google for solution.

Changed 7 years ago by srikanth pachava

Attachment: ckeditor.js added

Changed 7 years ago by srikanth pachava

Attachment: config.js added

comment:12 Changed 7 years ago by srikanth pachava

attached two files, you will find how i disable paste option in context menu. context menu is working when i right click it shows only copy instead of paste. Thanks for the support to overcome my problem.

comment:13 Changed 7 years ago by Jakub Ś

This is the last comment for this ticket.

Your config.js is good but you haven’t removed code from ckeditor.js. It still contains j.tabletools={requires:['table','dialog','contextmenu'] while it should have j.tabletools={requires:['table','dialog'].

comment:14 in reply to:  12 Changed 6 years ago by Sathish

Replying to sri224455:

attached two files, you will find how i disable paste option in context menu. context menu is working when i right click it shows only copy instead of paste. Thanks for the support to overcome my problem.

Hi, Have you done any changes in ckeditor.js in order to remove paste option from context menu?

Thanks in advance.

Last edited 6 years ago by Sathish (previous) (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy