The latest version of FCKeditor is currently 2.6.6. I searched for the configuration method of this version online and found that there are few asp configuration methods. Here are some of your configuration experiences with you in need. First, download the latest version from FCKEditor official
Installation and configuration method:
1. Open the folder and find that there are many files that are not useful for ASP; delete unnecessary files in FCKEditor2.6.6: Unzip FCKeditor_2.6.6.zip into the fckeditor folder of the root directory of your website, and at the same time put the folder Delete the folders and files with _ in them together:
1. In the fckeditor directory, except for the editor directory, fckconfig.js, fckeditor.asp, fckeditor.js, fckstyles.xml, and fcktemplates.xml, all the rest can be deleted.
2. All other deletions except the asp directory in the editor/filemanager/connectors directory
3. All except en.js, zh.js, and zh-cn.js in the editor/lang directory are deleted. This is the language setting. If you want to keep it, you can keep it.
4. Delete the _samples directory. Here are some sample files. If you want to see it, you can leave it.
The above are some streamlining work. If you want to know more, you can check more information online.
2. Call fckeditor.asp. For example: <!--#include file=../fckeditor/fckeditor.asp -->
Change <textarea name=></textarea> to the following code where the content is placed in the form:
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = /FCKeditor/ //Set the editor path, 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 //In the future, the content in the editor will be obtained by this content, and the naming will be determined by you.
%>
(Some suggestions for novices, avoid detours. Here you must delete <textarea></textarea>, do not use hidden fields, otherwise you will submit it twice in sequence when publishing an article, and a comma will appear at the end of the paragraph)
oFCKeditor.Create content The content here can be determined by you, which is equivalent to the name in <textarea name=></textarea>.
oFCKeditor.Value = As mentioned above, it defines the initial value of the editor, which will be used here when you modify the article.
At this point, the installation of your fckeditor will be completed and you can complete the function of publishing articles. Isn't it very simple
PS: The method of call can also be used in JS. Related content can be found online, so I won’t explain it in detail here.
3. 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, it will be mentioned below.
In fckeditor 2.6.6 version, it is no longer the default asp, but it has become PHP (PS: I am very good at programming, so I can only use asp).
Take your time and open fckconfig.js
Find FCKConfig.DefaultLanguage, its default is en, we change it to zh-cn, and change the true in the corresponding FCKConfig.AutoDetectLanguage = true; to false; this is the language retrieval function. If you do not change the language, give it to it. The default is OK.
Find var _FileBrowserLanguage = 'asp';
var _QuickUploadLanguage = 'asp';
The default is PHP, and it is changed to ASP
This file can be modified according to personal preferences:
Find FCKConfig.FontNames, and you can add some Chinese fonts to the back.
Find FCKConfig.ToolbarSets[Default], which is a tool on the editor. The following content is some tools. You can make some corresponding modifications and remove what is not used. for example:
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], this long list is to define bold, italics, those, if you don't want these You delete this long list of codes, and if you want to leave a bold one, you delete all except 'Bold'.
This file has been almost changed, and the following is the modification of the upload path:
Open the FCKeditor/editor/filemanager/connectors/asp/config.asp file
Find ConfigIsEnabled = false, change false to true;
Find ConfigUserFilesPath = /userfiles/The userfiles here is the default file storage path, you can also change it to another file name. Note that you must create this file in your website.
Extension: If you want to classify your uploaded images by time, you can change them to: ConfigUserFilesPath = /userfiles/&year(now())&/&right(0&month(now()),2)&/&right(0&day( now()),2)&/
OK, this file is OK
Below we will restrict the uploaded pictures:
Open the FCKeditor/editor/filemanager/connectors/asp/command.asp file
When the sentence oUploader.MaxSize = 0 is found and the unit of 0.3 is 0.3, and the size of the limited image is 0.3M.
Open the FCKeditor/editor/dialog/fck_image/fck_image.js file
turn up
GetE('txtWidth').value = oImageOriginal.width;
GetE('txtHeight').value = oImageOriginal.height ;
Change to
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, let's test now. If you want to make further changes, you can check the relevant information online
I hope the above will be useful to everyone.