How to install and configure FCKeditor 2.6.6 in ASP

Source: Internet
Author: User

First download the latest FCKEditor version.
Http://www.jb51.net/codes/21294.html provided by the foot home

Installation and configuration methods:
1. Many files cannot be used by ASP when you open a folder. Delete unnecessary files in FCKEditor2.6.6: Decompress fckeditor_2.6.6.zip to the fckeditor folder in the root directory of your website, delete the folder and file with _ in the folder at the same time:
1. In the fckeditor directory, except for the editor directory, fckconfig. js, fckeditor. asp, fckeditor. js, fckstyles. xml, and fcktemplates. xml, you can delete all the other files.
2. Delete all files except the asp Directory in the editor \ filemanager \ connectors directory
3. In the editor \ lang directory, all except en. js, zh. js, and zh-cn.js are deleted. Here is the set language, if you want to retain can be retained
4. Delete the _ samples directory. Here are some sample files that you want to see.
The above are some streamlined work. For more information, please refer to more information on the Internet.

2. Retrieve fckeditor. asp. Example: <! -- # Include file = "../fckeditor. asp" -->
Change <textarea name = ""> </textarea> to the following code:
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
OFCKeditor. BasePath = "/FCKeditor/" // set the editor path, which is a directory under the root directory of my site
OFCKeditor. ToolbarSet = "Default"
OFCKeditor. Width = "100%"
OFCKeditor. Height = "400"

OFCKeditor. Value = "" // This is the initial Value for the editor.
OFCKeditor. Create "content" // the content in the later editor is obtained by this content, and the name is determined by you.

%>
(Provide some suggestions for new users to avoid detours. Here, you must delete <textarea> </textarea> and do not hide the domain. Otherwise, the article will be submitted twice in sequence and a comma (,) will appear at the end of the section.
OFCKeditor. Create "content" you can set the content here, which is equivalent to the name in <textarea name = ""> </textarea>.
OFCKeditor. Value = "" the above is the definition of the editor's initial Value, which will be used here when you modify the article.
At this point, the installation of your fckeditor is complete, and you can complete the function of publishing the article. Is it easy?
PS: You can also use the JS method for the retrieval method. Relevant content can be found online. I will not elaborate on it here.

3. After the above steps, we have completed some basic functions, but you will find that the image upload function is useless. Don't worry. We will talk about it below.
In fckeditor 2.6.6, asp is not the default version, and PHP is changed. (PS: I am very fond of programming and can only use asp ).
Start fckconfig. js
Find FCKConfig. defaultLanguage. The default value is en. we replace it with zh-cn and set the corresponding FCKConfig. autoDetectLanguage = true; change true to false. This is the language retrieval function. If you do not change the language, you can set it to the default one.
Find var _ FileBrowserLanguage = 'asp ';
Var _ QuickUploadLanguage = 'asp ';
PHP is used by default, and ASP is used.
This file also looks at your personal preferences for modification:
Find FCKConfig. FontNames and add some Chinese fonts to it.
Find FCKConfig. toolbarSets ["Default"]. This is the tool on the editor. The following content is some tools. You can make some corresponding modifications and remove them if they are not used. For example:
['Bold ', 'italic', 'underline', 'strikethangout', '-', 'subscript', 'superscript']. This long string defines the blacklist, in italics, if you don't want it, you can delete this long string of code. If you want to leave a simhei, you can delete all except 'bold.

This file is almost changed. The following is the modification of the upload path:
Open the FCKeditor \ editor \ filemanager \ connectors \ asp \ config. asp file.
Find ConfigIsEnabled = false and change false to true;
Find ConfigUserFilesPath = "/userfiles/". Here, userfiles is the default file storage path. You can also change it to another file name. Note that this file must be created on your website.
Extension: If you want to classify uploaded images by time, you can change it to: ConfigUserFilesPath = "/userfiles/" & year (now ()) & "/" & right ("0" & month (now (), 2) & "/" & right ("0" & day (now (), 2) &"/"
Okay, this file is OK.

Next we will restrict the uploaded images:
Open the FCKeditor \ editor \ filemanager \ connectors \ asp \ command. asp file.
Change oUploader. MaxSize = 0 to "oUploader. MaxSize = 0.3*1024*1024", where the unit is 0.3 MB, and the image size is limited to 0.3 MB.
Open the FCKeditor \ editor \ dialog \ fck_image \ fck_image.js file.
Find
GetE ('txtwidth'). value = oImageOriginal. width;
GetE ('txtheight '). value = oImageOriginal. height;
Change
If (oImageOriginal. width <630 ){
GetE ('txtwidth'). value = oImageOriginal. width;
GetE ('txtheight '). value = oImageOriginal. height;
} Else {
GetE ('txtwidth'). value = 630;
GetE ('txtheight '). value = 630 * oImageOriginal. height/oImageOriginal. width;
}

OK. Now let's test it. For further modification, you can view relevant information online.
The above hopes to be useful to everyone.

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.