Search code examples
javascriptckeditorfckeditorckfinder

ckeditor do not work when i add extraPlugins


i have uploaded codesnippet plugin inside /ckeditor/plugins/ directory.

My config.js file codes are:

    CKEDITOR.editorConfig = function( config ) {
        config.toolbar = [
            { name: 'basic', items: [ 'Bold', 'Italic', 'Underline' ] },
            { name: 'font', items: [ 'Font' ] },
            { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', 'Blockquote' ] },
            { name: 'links', items: [ 'Link', 'Unlink' ] },
            { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule' ] },
            { name: 'last', items: [ 'Maximize' ] }
        ];

        config.extraPlugins = 'codesnippet';
        config.format_tags = 'p;h1;h2;h3;pre';
        config.entities = false;
        config.removeDialogTabs = 'image:advanced;link:advanced;table:advanced';
        config.disableNativeSpellChecker = false;

    };

But when i add config.extraPlugins = 'codesnippet'; line then editor do not work even i can't see textarea field.

And when i remove config.extraPlugins = 'codesnippet'; line then editor works perfectly.


Solution

  • Use the online builder to add the codesnippet plugin to your editor. Most probably your editor is missing dependencies.

    Most plugins in CKEditor require some additional plugins to operate. If you download manually plugin A, there is a chance that you need to download dependencies for plugin A... and plugin B, which is required by plugin A. And sometimes you will need to download dependencies for plugin C, which was required by plugin B. Sounds like a nightmare, this is why we created online builder and why package managers exist.