Disable ckeditor context menu in version 4.4.6

江枫思渺然 提交于 2019-12-05 23:12:24

As simple as that:

CKEDITOR.replace( 'textarea', {
    removePlugins: 'contextmenu,tabletools' 
} );

If it does not help you, you must include a valid sample to reproduce the issue because something exotic is going on in your setup.

If anyone is looking on how to disable the context menu and have access to the native browser spellchecker in CKEditor:

CKEDITOR.replace( 'editor1', {
    removePlugins: 'contextmenu,liststyle,tabletools,tableselection',
    disableNativeSpellChecker: false
} );

(tested on CKEditor 4.7.0, standard package)

In my Drupal 7 environment, loading ckeditor from the CDN, current version is 4.11.4. The only thing that worked for me after many failed alternatives:

config.removePlugins = 'liststyle,tableselection,tabletools,tableresize,contextmenu';

For convenience, I put this in the module configuration settings -> Advanced -> Custom JavaScript configuration, but in my experience the same result can be achieved in the ckeditor.config.js file in the module folder. (It's just more likely to get accidentally overwritten there, when updating the module. ... you could also do it by checking the option to use the config.js file in your theme and then adding the line above to that file.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!