Search code examples
javascriptckeditorckeditor4.x

How to remove characters from SpecialChar plugin in CKEditor?


I'm trying to remove few special characters from specialchar plugin but it seems impossible.

I've edited lang file in plugins/specialchar/dialogs/lang/de.js and removed — and Ñ, but they are still shown in dropdown menu only without hover label.

I've searched everywhere and can't find any more usage of that specialchar menu.

Does anyone know how to remove them?


Solution

  • Are you using newer versions of ckeditor4? if so, based on the specialchar doc, you should change the CKEDITOR.config.specialCharssetting in the ckeditor4/plugins/specialchar/plugin.js file.

    EDIT: if you are using older version, can you find config.js file? if you do, change it to something like below:

    CKEDITOR.editorConfig = function( config ) {
        // Define changes to default configuration here. For example:
        // config.language = 'fr';
        // config.uiColor = '#AADC6E';
    
        config.specialChars = [
            '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', '-', '.', '/',
            '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';'];
    };
    

    It works as shown in this screenshot showing limited chars