I realize this is more a question about using CKEditor 4.5 than a wysiwyg question, but I think the solution to this question would help a lot of folks out. Using wysiwyg 7.x-2.2+63-dev with the CKEditor 4.5.1 full library, I am looking to remove the Advanced tab from the image pop-up dialogue box. Can anyone suggest the best way to do this without necessarily editing any of the CKEditor files? I'd like to preserve the change for the next potential update to CKEditor 4.5.2 for example.
Please see the screenshot attached for exactly what I am looking to remove.
The answer might involve using the code from CKEditor 4 Documentation, which suggests:
config.removeDialogTabs = 'link:target;link:advanced;image:Link;image:advanced';
I initially tried to add this to the config.js file in the library, like so, but it didn't seem to have any effect after clearing all caches:
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.removeDialogTabs = 'link:target;link:advanced;image:Link;image:advanced';
};
Can anyone suggest a working way to do this, and again, if possible how to implement in a way that would carry over to future updates with CKEditor 4.x? Thanks.
Comment | File | Size | Author |
---|---|---|---|
#1 | ckeditor-451-remove-tab.jpg | 73.04 KB | rajmataj |
Comments
Comment #1
rajmataj CreditAttribution: rajmataj commentedComment #2
TwoDWysiwyg does not load config.js so no changes there will have any effect.
Implement hook_wysiwyg_editor_settings_alter() in a small Drupal module instead.
No need to modify any of the CKEditor files so this will still work when upgrading the CKEditor library.
Comment #3
rajmataj CreditAttribution: rajmataj commentedFantastic! Thank you so much TwoD. Works like a charm.
Comment #5
Stephen OllmanExcellent, the module solution worked for me with the CKEditor version of 4.6.1, although it's IMPORTANT to note the capitalisation of 'image:Upload' & 'image:Link' as these are required for it to work with the image dialog tab.