Customizing the CKEditor Menu

Source: Internet
Author: User

To modify the configuration file config.js to customize the Cheditor menu, you need the following steps:

  1. Locate the Config.js file for the CKEditor installation directory

  2. Make a note of the feature name you want to use, and the following "-" represents the delimiter, "/" for line break

[' Source ', '-', ' Save ', ' NewPage ', ' Preview ', '-', ' Templates '],
[' Cut ', ' Copy ', ' Paste ', ' pastetext ', ' Pastefromword ', '-', ' Print ', ' spellchecker ', ' Scayt '],
[' Undo ', ' Redo ', '-', ' Find ', ' Replace ', '-', ' selectall ', ' Removeformat '],
[' Form ', ' Checkbox ', ' Radio ', ' TextField ', ' Textarea ', ' Select ', ' Button ', ' ImageButton ', ' HiddenField '],
‘/‘,
[' Bold ', ' Italic ', ' underline ', ' Strike ', '-', ' subscript ', ' superscript '],
[' Numberedlist ', ' BulletedList ', '-', ' outdent ', ' Indent ', ' Blockquote '],
[' Justifyleft ', ' justifycenter ', ' justifyright ', ' Justifyblock '],
[' Link ', ' Unlink ', ' Anchor '],
[' Image ', ' Flash ', ' Table ', ' horizontalrule ', ' Smiley ', ' Specialchar ', ' pagebreak '],
‘/‘,
[' Styles ', ' Format ', ' Font ', ' FontSize '],
[' TextColor ', ' BGColor '],
[' Maximize ', ' showblocks ', '-', ' about ']

 3, modify the Config.js file, assuming the following is the full content of Config.js

1Ckeditor.editorconfig =function(config)2 {3Config.toolbar = ' Mycustom ';//which configuration to choose here. The Mycustom configuration item is now selected, not the MYCUSTOM2 configuration item4Config.toolbar_mycustom =5 [6[' Bold ', ' Italic ', '-', ' Image ', ' Link ', ' Unlink ']//the menu here has bold, italic, picture management, hyperlinks, unlink, and no hyperlinks.7 ]8 9Config.toolbar_mycustom2 =Ten [ One[' Bold ', ' Italic ']//the menu here has bold, italic features A ] -};

    If you want to add Flash, Cut, copy function in the Mycutom, it can be added inside, the code is as follows:

1Ckeditor.editorconfig =function(config)2 {3Config.toolbar = ' Mycustom ';4Config.toolbar_mycustom =5 [6[' Bold ', ' Italic ', '-', ' Image ', ' Link ', ' Unlink ', ' Flash ', ' Cut ', ' Copy ']//new features for Flash, Cut and copy are added here.7 ]8 9Config.toolbar_mycustom2 =Ten [ One[' Bold ', ' Italic '] A ] -};

     

Customizing the CKEditor Menu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.