How to remove buttons from CKeditor 4

后端 未结 10 1461
难免孤独
难免孤独 2020-12-24 12:36

The question is in the title : How to remove buttons from CKeditor 4 .

Documentation does not answer it clearly

相关标签:
10条回答
  • 2020-12-24 13:08

    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

    0 讨论(0)
  • 2020-12-24 13:17

    Try

    config.removeButtons = 'Save'; 
    

    this will completely remove the save button.

    0 讨论(0)
  • 2020-12-24 13:19

    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.

    0 讨论(0)
  • 2020-12-24 13:22

    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';
    };
    
    0 讨论(0)
  • 2020-12-24 13:24

    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.
    
    };
    
    0 讨论(0)
  • 2020-12-24 13:29

    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.

    0 讨论(0)
提交回复
热议问题