Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript remove ckeditor plugins on load

Html:

<textarea name="Editor" class="ckeditor" id="aboutme">@Model.Content</textarea>

Javascript:

<script>
    config.removePlugins = 'elementspath,save,font';
</script>

When page load , i want to disable all ckeditor plugins.I tried above code however it did not work for me.

How can i remove plugins by javascript on load of page ?

Any help appreciates. Thanks.

like image 743
John Elizabeth Avatar asked Jul 10 '14 12:07

John Elizabeth


1 Answers

You can define a list of plugins to load (CKEDITOR.config#plugins):

config.plugins = 'wysiwygarea,toolbar,basicstyles,...';

But you can also restrict existing (default) list of plugins (CKEDITOR.config#removePlugins):

config.removePlugins = 'link,...';

Both options can be defined globally (config.js) or for a particular editor instance like

CKEDITOR.replace( 'editor1', {
    removePlugins: 'link'
} );

Please refer to official Setting Configuration guide to know more.

Note: Since CKEditor 4.1, the presence of a plugin determines whether certain type content associated with that plugin is allowed or disallowed. Read more about Advanced Content Filter.

like image 98
oleq Avatar answered Oct 13 '22 11:10

oleq