FCKeditor settings and Optimization

Source: Internet
Author: User

FCKeditor settings and Optimization

1. fckconfig. skinpath = fckconfig. basepath + 'Skins/default/'; set the editor style. There are three options under Editor/skins.
2. fckconfig. fontnames font. Common fonts can be added:; _ gb2312;
3. fckconfig. linkbrowser = false; // disable the browsing server function of the link.
Fckconfig. imagebrowser, similar to fckconfig. flashbrowser
4. fckconfig. linkupload = false; // disable the upload function of the link.
Fckconfig. imageupload, similar to fckconfig. flashupload
5.Fckconfig. imagedlghidelink = true; fckconfig. imagedlghideadvanced = true; Sets whether the link label and advanced label are displayed when the image is uploaded. If you want to hide the label, set it to true.
Supplement:
1. default language
Open the fckconfig. js file (the same as the FCKeditor folder), change the automatic detection language to not detect, and change the default language to simplified Chinese:
Program Code
Fckconfig. autodetectlanguage = false;
Fckconfig. defaultlanguage = 'zh-cn ';

2. Font list
Open the fckconfig. js file and add the frequently used "; _ gb2312" to the font list ":

Program code
Fckconfig. fontnames = '; _ gb2312; Arial; Comic Sans MS; Courier New; tahoma; Times New Roman; verdana ';

3. File Upload
The file management program of FCKeditor is in the filemanager folder and can be divided into browser and upload. Browsing refers to browsing server files, selecting them, or uploading local files to the server. Uploading refers to quick upload. In the window, click the "Upload" tab to open it, similar to the UBB editor we use, select a local file and upload it.
That is to say, FCKeditor has a file browsing and two files are uploaded. Some of these settings are in one file, while others are in multiple files. It's complicated and there are many changes. Let's talk about it in a few moments.

① Open and close the file browsing and uploading Functions
There are three files related to this switch. One is a JS file and the other is an ASP file. when the former is disabled, no related windows or buttons are displayed on the interface, and the latter is disabled and related functions are unavailable.
The first is the fckconfig. js file. The following content is set to true and false to off.
Upload in file browsing and browsing:

Program code

Code:
 
Fckconfig. linkbrowser = false; fckconfig. imagebrowser = false; fckconfig. flashbrobrowser = false;

Quick file upload:

Program code

Code:
Fckconfig. linkupload = true; fckconfig. imageupload = true; fckconfig. flashupload = true;


Supplement 2:
Determines whether the content of the FCKeditor editor is empty.
VaR oeditor = fckeditorapi. getinstance ("remarkmemo"); // content is the name of the fck instance and the name of the form text box.

Code:
If (oeditor. getxhtml (true). Length = 0) {alert ("Enter the comment! "); Oeditor. Focus ();}


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.