FCKeditor toolbar Customization

Source: Internet
Author: User
FCKeditor is indeed an excellent HTML online editor with powerful functions, flexibility, and strong customization.

FCKeditor has many default toolbar projects, which can be customized to meet your needs.

There are also many methods for customizing the toolbar on the Internet. Below is one of them:

Find the fckconfig. toolbarsets section in fckconfig. js. By default, there are two toolbar styles: Default and basic (my version is 2.5 ).

Add the following section: 1fckconfig. toolbarsets ["Custom"] = [
2 ['fontformat', 'fontname', 'fontsize'],
3 ['bold ', 'italic', 'underline', 'strikethangout', '-', 'subscript', 'superscript'],
4 ['orderedlist', 'unorderedlist', '-', 'outdent ', 'indent', 'blockquote'],
5 ['justifyleft', 'justifycenter', 'justifyright', 'justifyfull'],
6 ['image', 'flash', 'table', 'rule', 'smiley ', 'specialchar', 'pagebreak'],
7 ['link', 'unlink', 'anchor '],
8 ['textcolor', 'bgcolor'], '/'
9 ['cut ', 'copy', 'paste', 'pastetext ', 'pasteword'],
10 ['undo ', 'redo', '-', 'Find ', 'replace', '-', 'selectall', 'removeformat'],
11 ['fitwindow', 'showbuckets', '-', 'source', 'about'] // No comma for the last row.
12];

Then, make the following changes in the Code.

Note that row 7th is added, specifying the toolbar to be used
1 <%
2 dim ofckeditor
3 set ofckeditor = new FCKeditor
4 ofckeditor. basepath = "Edit /"
5 ofckeditor. value = ""
6 ofckeditor. config ("skinpath") = "/website/manage/edit/Editor/skins/silver /"
7 ofckeditor. toolbarset = "Custom"
8 ofckeditor. Create "txtcontent"
9%>
10

Its custom syntax is simple.
[] Indicates a toolbar,
The short horizontal line '-' in [] indicates a vertical split line.
''An identifier is added to the middle of the two single quotes to indicate a toolbar button. You can find the corresponding relationship by yourself.
'/' Is similar to a carriage return. Add a new line to the toolbar after the symbol.

My final customization results are as follows:

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.