FCKeditor 2.6.6 Installation and configuration method in ASP _ Page Editor

Source: Internet
Author: User
First download the latest version from the FCKeditor official
The cloud-dwelling community offers download addresses http://www.jb51.net/codes/21294.html

Installation and Configuration methods:
First, open folder found that there are many files for the ASP is not used; Delete unnecessary files in FCKEditor2.6.6: Unzip fckeditor_2.6.6.zip to your site root directory FCKeditor folder, with the folder _ Folders and files are deleted:
1.fckeditor directory except editor directory, Fckconfig.js, fckeditor.asp, Fckeditor.js, Fckstyles.xml, fcktemplates.xml these reservations, the rest can be deleted all
Delete all except ASP directory in 2.editor\filemanager\connectors directory
3.editor\lang directory In addition to En.js, Zh.js, zh-cn.js all Delete, here is set the language, if you want to retain the
4. Delete the _samples directory, here are some sample files, want to see can stay.
The above is a number of streamlining work, want to learn more, can read more information on the Internet.

Two, the transfer of fckeditor.asp. such as:<!--#include file= ". /fckeditor/fckeditor.asp the
Place the content in the form <textarea name= "" ></textarea> to the following code:
<%
Dim Ofckeditor
 set ofckeditor = New FCKeditor
 ofckeditor.basepath = "/fckeditor/"  //Set editor path, A directory under the root directory of my site
 ofckeditor.toolbarset = "Default"
 ofckeditor.width = "100%"
  Ofckeditor.height = "" "

 ofckeditor.value =" "//This is to give the editor an initial value of
 ofckeditor.create" content "/ Later, the contents of the editor are obtained by this content, named by you

 %>
(some suggestions to beginners, can be less detours.) Here must delete <textarea></textarea>, do not use hidden fields, otherwise published articles will be submitted in turn two times, at the end of the paragraph will appear "comma"
ofckeditor.create "content" The content here can be determined by yourself, equivalent to the name of the <textarea name= "" ></textarea>.
Ofckeditor.value = "" Here is the definition Editor's initial value, which is used here when you modify the article.
to this, your FCKeditor installation will be completed, you can complete the release of the function of the article. Is it very simple?
PS: The method of the transfer can also use the JS method, the relevant content can be found on the Internet, here I will not elaborate.

Three, after the above steps, we have completed some basic functions, but you will find that the upload image function is not useful. Don't worry, the following will be said. The
is not in the FCKeditor 2.6.6 version is not the default ASP, into PHP (PS: Program Aspects of my dish, can only use ASP's).
Slowly, open fckconfig.js
Find Fckconfig.defaultlanguage, his default is en, we replace him with ZH-CN, and put the corresponding fckconfig.autodetectlanguage     = True to false; This is the language retrieval function, and if you don't change the language, give him the default.
Find var _filebrowserlanguage    = ' asp '; 
var _quickuploadlanguage    = ' ASP ';
Default is PHP, change to ASP
This file is also a place to see personal preferences to modify:
Find Fckconfig.fontnames, in the back you can add some Chinese fonts.
Find fckconfig.toolbarsets["Default"], this is the tool on the editor, the following is a number of tools, you can do some of the corresponding changes, which can not be used to the withdrawal. For example:
[' bold ', ' italic ', ' underline ', ' strikethrough ', '-', ' subscript ', ' superscript '], this long string is defined in bold, italic, those, If you don't want any of this, you delete this long string of code, and if you want to leave a bold you will delete all but ' bold '.

This file is changed almost, the following is the upload path modification:
Open fckeditor\editor\filemanager\connectors\asp\config.asp This file
Find configisenabled = False, change false to true;
Find Configuserfilespath = "/userfiles/" Here Userfiles is the default file store path, you can also change to other file names, note that this file you must build on your site.
Extension: If you want to make your uploaded pictures sorted by time you can change to: Configuserfilespath = "/userfiles/" &year (Now ()) & "/" &right ("0" & Month (now ()), 2 & "/" &right ("0" &day (today ()), 2) & "/"
OK, this file is OK

Below we limit the uploaded images:
Open fckeditor\editor\filemanager\connectors\asp\command.asp This file
Find ouploader.maxsize = 0 "This sentence changed to" ouploader.maxsize = 0.3*1024*1024 "where 0.3 of the units when m, limit the size of the picture 0.3M
Open Fckeditor\editor\dialog\fck_image\fck_image.js This file
Found it
Gete (' TxtWidth '). Value = Oimageoriginal.width;
Gete (' TxtHeight '). Value = Oimageoriginal.height;
Change into
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 out. To further change, you can access the relevant information online
The above hope is useful to everybody.

Related Article

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.