Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
CKEditor provides a context menu replacement by default. This disables in browser spell checking for those who don't want to use the spell check module (which is advertising supported).
Information on how to remove this is available here: http://cksource.com/forums/viewtopic.php?p=43905#p43905
With the context menu plugin disabled, the spell checking module and menu button module must also be disabled as so:
CKEDITOR.editorConfig = function( config )
{
config.removePlugins = 'scayt,menubutton,contextmenu';
}
Comments
Comment #1
TwoDThe easiest way to do this before #313497: Allow configuration of advanced editor settings gets in is by implementing hook_wysiwyg_editor_settings_alter() in a custom module.
Before the above issue is fixed we can't make the settings GUI for any editor unique.
Comment #2
neRok CreditAttribution: neRok commentedI am also trying to remove the CKEditor context menu. I have implemented the above hook (in my theme), which is working (has other settings in it also). The line
$settings['removePlugins']...
is having no effect.This is with the latest 7.x-2.x-dev (17) of WYSIWYG, and I have a slightly outdated CKEditor (4.1.1.5a2a7e3) - but wouldnt expect that to be the problem.
Comment #3
TwoDThis is a closed feature request (and/or support request), please don't change it to a bug report when the discussed code does not belong to Wysiwyg itself.
Since you say you have other overrides in the hook implementation too, but don't include it here, I can't tell if there could be a typo which causes a problem.
Also, I would strongly suggest you move the hook implementation to a module. Having it in your theme is a bit unpredictable and it may not execute at all depending on which theme is being used to edit the content. Having it in a module means it'll always be executed.
If that does not work, please create a new support request and include the entire hook implementation code and I'll have a look.
As far as I can tell, the contextmenu plugin is still named the same in CKEditor 4, so the needed settings changes should be the same compared to CKEditor 3.
Comment #4
diamondseaIf you don't want to add the code yourself, you can use the CKEditor Browser Context Menu module to remove CKEditor's custom right-click menu.