Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 543
Rinku Avatar asked Nov 18 '25 07:11

Rinku


1 Answers

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.

like image 67
Wiktor Walc Avatar answered Nov 20 '25 20:11

Wiktor Walc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!