如何禁用CKEditor上下文菜单?

Upp*_*age 20 javascript ckeditor

有人知道如何禁用CKEditor的上下文(右键单击)菜单吗?我期待一个配置选项,但我找不到一个.我正在使用v3.1.谢谢.

Ale*_*pin 37

从版本3.6.4开始,此问题中的其他答案不再起作用.请参阅错误#9284

需要禁用的三个插件(使用本问题中讨论的方法)是contextmenu,liststyletabletools.例如,使用配置文件:

CKEDITOR.editorConfig = function(config) {
    /* Your config options */
    ...
    config.removePlugins = 'contextmenu,liststyle,tabletools';
};
Run Code Online (Sandbox Code Playgroud)

  • 这对于 4.3.2(可能还有一些更早的版本)来说已经足够了。 (2认同)

Pek*_*ica 14

你需要删除contextmenu插件.请参阅此处获取3.1.


rus*_*ils 6

编辑器 4.7.1

CKEDITOR.editorConfig = function (config) {
  config.language = 'en';
  config.toolbar = "mini";
  config.removePlugins = 'elementspath,contextmenu,liststyle,tabletools,tableselection';
  config.disableNativeSpellChecker = false;
}
Run Code Online (Sandbox Code Playgroud)

ckeditor 4.8.0(不再需要删除'elementspath'插件)

CKEDITOR.editorConfig = function (config) {
  config.language = 'en';
  config.toolbar = "mini";
  config.removePlugins = 'contextmenu,liststyle,tabletools,tableselection';
  config.disableNativeSpellChecker = false;
}
Run Code Online (Sandbox Code Playgroud)