eng najjar
eng najjar

Reputation: 7

after many attempts, failed. Edit ckeditor

I'm a newbie in front-end and need to use ckeditor but with some mods here is my code

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>CKEditor Example</title>
        <script src="https://cdn.ckeditor.com/4.10.1/standard/ckeditor.js"></script>
    </head>
    <body>
        <textarea name="text_editor"></textarea>

        <script>
            //-------------------------------------
            CKEDITOR.replace( 'text_editor' );
                  width: '70%';
            CKEDITOR.config.removeButtons = 'Image'; 
             //-------------------------------------
        </script>
    </body>
</html>

I need to remove 'Image' button but I couldn't.

why the code below doesn't work ?

CKEDITOR.config.removeButtons = 'Image'; 

please help

Upvotes: 0

Views: 49

Answers (1)

user13764714
user13764714

Reputation:

Replace CKEDITOR.config.removeButtons = 'Image'; with

CKEDITOR.config.removePlugins = 'image';
CKEDITOR.removeButtons = "image";

If you need to remove multiple plugins, separate them with commas.

CKEDITOR.config.removePlugins = 'image, spellchecker';
CKEDITOR.removeButtons = "image, spellchecker";

Upvotes: 1

Related Questions