0

How to modify contextmenu in ckeditor

asked 2015-10-01 04:03:31 +0800

fpwei gravatar image fpwei
1

The default contextmenu in ckeditor only past item.

I need to modify contextmenu and add some item in it.

Is there any way to do it?

delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
0

answered 2015-10-01 06:41:25 +0800

chillworld gravatar image chillworld flag of Belgium
5367 4 9
https://github.com/chillw...

Hey,

You can change it by using customConfigurationsPath :

<ckeditor customConfigurationsPath="/js/ckeditor-config.js" value="some text" />

The config file is defined as followed :

CKEDITOR.editorConfig = function(config) {
    config.resize_enabled = false;
    config.toolbar = 'Complex';
    config.toolbar_Simple = [[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink', '-', 'About' ] ];
    config.toolbar_Complex = [[ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript','Superscript', 'TextColor', 'BGColor', '-', 'Cut', 'Copy', 'Paste', 'Link', 'Unlink'],
                              [ 'Undo', 'Redo', '-', 'JustifyLeft', 'JustifyCenter','JustifyRight', 'JustifyBlock' ], 
                              [ 'Table', 'SpecialChar','Styles', 'Format', 'Font', 'FontSize', 'Maximize'] ];
   //config.fontSize_defaultLabel = '12'; // set font size label to 12.
   //config.font_defaultLabel = 'Arial'; // set font family label to arial.
   config.removePlugins = 'elementspath'; // remove bottom bar

};

With this configuration, it will use the standard complex setting.
Note : When changing the js file, clear your cache because the js file isn't refreshed otherwise.

Greetz chill.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-10-01 04:03:31 +0800

Seen: 10 times

Last updated: Oct 01 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More