The question is in the title : How to remove buttons from CKeditor 4 .
Documentation does not answer it clearly
To remove buttons, try:
$(document).ready(function() {
CKEDITOR.config.removePlugins = 'Save,Print,Preview,Find,About,Maximize,ShowBlocks';
});
The comma-separated list must contain the name of each button you want to remove. The following link is the complete list of the buttons containing the toolbar ckeditor:
list-buttons
Try
config.removeButtons = 'Save';
this will completely remove the save button.
There is a handy tool come by default with the bundle, which can be found at ckeditor/samples/toolbarconfigurator/index.html
. It allows you to config the toolbar using GUI.
Open your config.js file and paste this code
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.removePlugins = 'blockquote,save,flash,iframe,tabletools,pagebreak,templates,about,showblocks,newpage,language,print,div';
config.removeButtons = 'Print,Form,TextField,Textarea,Button,CreateDiv,PasteText,PasteFromWord,Select,HiddenField,Radio,Checkbox,ImageButton,Anchor,BidiLtr,BidiRtl,Font,Format,Styles,Preview,Indent,Outdent';
};
Its so Simple.
Modify config.js
file as below
CKEDITOR.editorConfig = function (config) {
config.removePlugins = 'save,newpage,flash,about,iframe,language';
//The options which you don't need in the toolbar, you can add them in the above remove plugins list.
};
After much fooling around with manually removing button and styling the toolbar by editing the config.js
file, I found the ToolBar Configurator.
With that you can easily enable or disable buttons. Change button group order and add separators.
It is located in the /samples/toolbarconfigurator
of the ckeditor
folder. Just launch the index.html
. The Toolbar Configurator is inlcuded in all the different download packages on the download page
When you are done creating your toolbar, just click Get toolbar config
and copy the style to the config.js
file located in the main ckeditor
folder.