Online HTML editor FCKeditor full Guide [2]

Source: Internet
Author: User

FCKeditor configuration instructions:

The main configuration file of FCKeditor 2.0 is FCKeditor/fckconfig. js. Several important configuration items are as follows:

1. Change the configuration file:

$ Ofckeditor-> config ['customconfigurationspath'] = '/myconfig. js ';
Use this lineCodeYou can place the configuration file outside the FCKeditor directory.
Note that the original configuration file fckconfig. js cannot be deleted and must still be stored in the fckeidtor directory. In addition, after the configuration is changed, the browser cache should be cleared; otherwise, the latest page will not be displayed. If you are using IE, press Ctrl + F5 to force refresh.

2. toolbar Configuration

By default, FCKeditor calls the default toolbar button. Each element of the fckconfig. toolbarsets ["default"] array corresponds to a tool, which can be increased or decreased as needed.

3. Style)

FCKeditor's preset styles include image on right, image on left, title, code, etc. If you have a special format that you commonly use, you can add it by yourself. The files to be modified include:
Fckconfig. js
Fckconfig. fontformats =
Editor/_ source/classes/fcktoolbarfontformatcombo. js
VaR onames =
Editor/JS/fckeditorcode_ie_2.js and/Editor/JS/fckeditorcode_gecko_2.js
VaR onames =
Editor/lang/language file of your choice
Fontformats

Styles configuration file is an XML file, namely fckstyles. xml. You can also create an XML file and specify the configuration file as your XML file.
In the configured JS, modify fckconfig. stylesxmlpath = '../myfckstyles. xml ';
<? XML version = "1.0" encoding = "UTF-8"?>
<Styles>
<Style name = "my image" element = "IMG">
<Attribute name = "style" value = "padding: 5px"/>
<Attribute name = "border" value = "2"/>
</Style>
<Style name = "italic" element = "em"/>
<Style name = "title" element = "span">
<Attribute name = "class" value = "title"/>
</Style>
<Style name = "title H3" element = "H3"/>
</Styles>

4. configuration template

for template configuration, refer to fcktemplates. XML, defined by yourself, and then set as the default template configuration file:
fckconfig. templatesxmlpath = '/mytemplates. xml';

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.