The wysiwyg-editor from http://CKEditor.com has too many buttons and is cluttored for many users. so I decided to remove unnecessary tabs and button. So I would like to remove the Advanced tab from the image uploader. Any suggestion how to do it?
It appears there are two methods of doing this;
1: Edit your CKEditor config definition(config.js):
config.removeDialogTabs = 'image:advanced';
Remember; the config setting is case-sensitive.
2: You can of course also do this in-line so you can refer to it by editor:
CKEDITOR.replace( 'editor_kama',
{ // ^---Editor Id goes here
removeDialogTabs : 'image:advanced'
});
Try this in plugins/images/dialog/image.js
id : 'advanced',
label : editor.lang.common.advancedTab,
hidden : true,
elements :
Adding the hidden : true should work. Or you could try:
yourDialogDefinition.getContents('advanced').hidden=true;
It appears that config.removeDialogTabs = 'image:advanced';
does not work anymore - or at least it did not work for me. But there are instructions if the official documentation on how to edit dialogs. Based on those instructions, I use this solution:
CKEDITOR.on('dialogDefinition', function (ev) {
var dialogName = ev.data.name,
dialogDefinition = ev.data.definition;
if (dialogName === 'image') {
dialogDefinition.removeContents('advanced');
dialogDefinition.removeContents('link');
}
});
Since the removeDialogTabs doesn't work anymore, the latest way of hiding the tab is simply:
linkShowAdvancedTab = false
in the config. This works in version 4.13 at least.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With