Let me first talk about my test environment: XPSP2, IIS5.1, FCKeditor2.0
Create a new site on IIS, I named it FCKeditor directly
Establish a corresponding site in DW, the test server is native, and supports VBScript
Download FCKeditor 2.0. This thing is open source and there are many places you can download online. Find it yourself...
What you download should be a compressed package, decompressed to the root directory of the FCKeditor site, and you can start calling directly. When you know, you will find that it is so simple that you will die!
In the site root directory, create a new page and add the following code to the segment (call the editor):
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
= "/FCKeditor/" //Set the editor path, a directory under the root directory of my site
= "Default"
= "100%"
= "600"
= "" //This is the initial value for the editor
"logbody" //In the future, the content in the editor will be obtained by this logbody, and the name will be determined by you
%>
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
= "/FCKeditor/" //Set the editor path, a directory under the root directory of my site
= "Default"
= "100%"
= "600"
= "" //This is the initial value for the editor
"logbody" //In the future, the content in the editor will be obtained by this logbody, and the name will be determined by you
%>
If you add this paragraph, don't forget to add it in the first second line.
<!--#include file="FCKeditor/" -->
Include it. Remember to remember!
It's that simple!
Now you just use this editor as a control, and use: request("logbody") when extracting its data.
Now let's breathe a sigh of relief. The test was successful. There are some settings inside, please go to the Internet to find some advanced instructions for use.
Preliminary use of FCKeditor
FCKeditor 2.0 version has finally come out. The reason why the word "final" is used is because the popular Flash insertion function is added to this version. It can be said that among all online editors, FCKeditor is currently the best editor on the Internet. It has powerful functions and supports multiple browsers. It has no platform restrictions. It can be integrated with multiple WEB languages, multi-language support, open source, etc.
For a brand new website, FCKeditor can be used directly, without any modifications. However, for most existing websites, some settings of FCKeditor are not suitable for your own use. This article aims to tell you to simply modify FCKeditor to facilitate the use of your website.
The first job is to streamline this large-scale editor, of course, it is to streamline files rather than functions. Here I take the asp version of FCKeditor as an example, enter the FCKeditor 2.0 folder, and first delete all the folders starting with "_". These folders contain examples or some other tools. In fact, it is just to keep the editor folder, , , , , , . After the outermost simplification is completed, enter the editor folder and delete the "_source" folder first. Here are some source files, which are of no use for use.
Enter the images folder and delete the smiley folder. Some files are placed with emoticons. Since I will use my own emoticons to delete them first. Of course, if you want to use the emoticons here, don't delete them. Exit images and enter the lang folder. You can clean up the things here. Only these four files are retained. The first file is the language configuration file. With it, you can set it to the corresponding corresponding language file. It is a simplified Chinese language package. Needless to say, it is from traditional Chinese. How about it? I lost a few hundred K at once, so it's great~
Exit the lang folder and enter the skin folder. If you want to use the default yellow color of fckeditor, then delete the other two folders except the default folder. If you want to use something else, then consider it yourself. But I would like to give you a suggestion. If you don’t want to use the default one, then choose the silver, because silver, that is, gray, and any color will not be difficult to match. I don’t like the skin of office2003 anyway, and the picture is relatively large, which increases the download time. Don’t!
The last step to simplify it is to exit the skin folder and then enter filemanager. If you are not using the latest version of fckeditor, then there is a folder browser here, and the new version also has an upload folder. Come one by one, first enter filemanager/browser/default/connectors/. Because I use asp, I delete all except the asp folder. Then enter filemanager/upload/, and then leave only the asp folder. At this point, the editor simplification has ended. Next, we will make settings and modifications to the editor.
The first modified file, which is the total configuration file of the fckeditor, is located in the root directory. Please follow the list below (whichever is the case with fckeditor version 2.0):
Find line 20 = 'en' ; Change to = 'zh-cn' ; Set the default language to Simplified Chinese
Find line 40 = 0; change to = 1; that is, you can use the Tab key in the editor domain.
If your editor is still used in the front desk of the website, such as when using a message book or a diary reply, you have to consider security. Don’t use the Default toolbar in the front desk. You either customize the functions or use Basic, which is the basic toolbar that has been defined by the system.
Found line 64 ["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-',/*'Link', */'Unlink','-','Style','FontSize','TextColor','BGColor','-','Smiley','SpecialChar','Replace','Preview']
] ;
This is the Basic I have changed. Remove the image function and the link addition function, because the image and link, the Flash and image button addition functions can allow the front desk page to directly access and upload files. If you don't change here, you will upload a * to you and don't finish playing immediately? But this is not enough. Fckeditor also supports the right mouse button function in the editing domain.
Found line 73
= ['Generic',/*'Link',*/'Anchor',/*'Image',*/'Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField',/*'ImageButton',*/'Button','BulletedList','NumberedList','TableCell','Table','Form'] ;
This is also what I have changed to remove the "link, image, Flash, image button" functions of the right mouse button.
Found line 77 = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
Add several fonts we commonly use = 'Song font; bold font; official script; Kai font_GB2312; Arial; Comic Sans MS; Courier New; Tahoma; Times New Roman; Verdana'; ;
Next, we will set up the upload function. Take ASP as an example. In fact, the default fck is asp. Just delete all commented codes below 100 lines, and then change all the following related and related ?Type=XX to Type=YY, where YY is the name of the folder you want to save the file.
If you still want to use your own emoticon icon, then jump to line 131 and change the folder address of the emoticon icon and the file name of the emoticon icon below. The three numbers below are the number of emoticons displayed in each line and the width and height of the pop-up window. The size of this depends on the size of the window arranged by your emoticon icon. OK, the total configuration file modification has ended.
Next is the setting of the editor location. My habit is to place the editor in the root directory, and the five files mentioned at the beginning are also placed in the root directory (Tips: It is recommended to place it in the root directory, and it is recommended to set the path to use the absolute path, such as "/fckeditor/", while my habit is "/"). This is conducive to the update and upgrading of fckeditor, and all folders under the website can be called arbitrarily, and there is no problem that other folder names change and the editor cannot be used elsewhere.
Open the file and find sBasePath = "/fckeditor/" to sBasePath = "/"
Open the file and find = '/fckeditor/' ; Change to = '/' ;
The default display font in the editor domain is 12px, while the default font on my home page is 14px, so it feels very uncomfortable to look at it. If you want to modify it, you can achieve the requirements by modifying the style sheet. Open /editor/css/fck_editorarea.css and change line 4 to font-size: 14px;.
Next is the setup for uploading files. This is more troublesome, please operate carefully.
Open \editor\filemanager\browser\default\, find line 15, insert "['uploadfile','uploadfile']," and match the settings just now. Then my upload file path is /uploadfile. Of course, you can also change it to the folder you want, but the name here must be consistent with the YY in "Type=YY".
Not finished yet, continue to enter editor\filemanager\browser\default\connectors\asp, open it, first change ConfigIsEnabled = False to ConfigIsEnabled = True. If the file is not impossible, then change ConfigUserFilesPath = "/UserFile" to the ConfigUserFilesPath = "/" I want.
Then add "uploadfile", "" after "Set ConfigDeniedExtensions = CreateObject( "" )"
"uploadfile", ""
Similarly, the settings here must correspond to the above and inside.
There is another upload, which is a quick upload. This function is only available in fckeditor 2.0. Previous versions did not have this function. Enter \editor\filemanager\upload\asp, and open it, and set ConfigIsEnabled = False to ConfigIsEnabled = True. I changed ConfigUserFilesPath = "/UserFiles/" to the ConfigUserFilesPath = "/uploadfile/"& Year(Date()) &"-"& Month(Date()) &"/" because my upload file is placed in the uploadfile folder and is open to it by month. Quick upload will not allow you to select a folder, but will be uploaded directly through the settings here. If the settings here are not well matched with the previous settings, your files will be uploaded in a mess and inconvenient to manage. Repeat the operation in the previous one before the connection, and add it to the next
"uploadfile", ""
"uploadfile", ""
Next, let’s talk about how to create your own online editor. Here we take ASP and JS versions as examples, ASP version sample code, which is generally used for background operations:
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
= "/"
= "Default"
= "100%"
= "400"
= rs("logbody")
"logbody"
%>
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
= "/"
= "Default"
= "100%"
= "400"
= rs("logbody")
"logbody"
%>
Of course, the ASP version can only be used in pages with .asp as the extension. If you set BasePath to "/" in the previous section, you can save the third line here. The ASP version only has one Create function. It is recommended to use the ASP version when modifying a content.
Next, let’s look at the JS version:
<script type="text/javascript">
var oFCKeditor = new FCKeditor( 'logbody' ) ;
= '/' ;
= 'Basic' ;
= '100%' ;
= '400' ;
= '' ;
() ;
</script>
The settings of BasePath are as mentioned above. The JS version can be used in any web page, or even html pages, because it is generated by the client. The advantage is that it can reduce network traffic, because the editor file only needs to be downloaded once, and the second is that it can be defined by the client when it is displayed. Since fckeditor initialization takes a certain amount of time, JS is very useful at this point.
In addition, there is another function function in the JS version, which is the ReplaceTextarea() function, which can replace the specified TextArea and take the reply part of my website's log:
<script type="text/javascript">
<!--
function showFCK(){
var oFCKeditor = new FCKeditor( 'fbContent' ) ;
= '/' ;
= 'Basic' ;
= '100%' ;
= '200' ;
= '' ;
//() ;
() ;
//document.blog_feedback. = '';
document.blog_feedback. = '';
document.blog_feedback. = 'true';
document.blog_feedback. = 'none';
}
//-->
</script>
Write it into a simple function, and the fckeditor is generated when the user displays the editor opens. Without initializing an editor every time the page is refreshed, the page will be much faster.
Supplement: As mentioned earlier, it is said that you should not use the JS version when editing existing data content. This is caused by the problem of single quotes ('). In the data content, there will inevitably be single quotes. When using JS version to generate an editor, the editor may not be able to generate normally due to single quotes. However, using asp is different. The ASP version is used because the data is regarded as a variable, and then it is directly assigned to the editor domain. Also, unless you want to use the ReplaceTextArea() method to generate the editor, you don’t need to write a tag like <textarea> first. Everything will be automatically generated by fckeditor. All you need to do is specify an instance name to fckeditor. At the same time, you don’t have to worry about how to submit. When the form is submitted, fckeditor will automatically submit, and the submitted variable name is named after the fckeditor instance you specified.
Create a new site on IIS, I named it FCKeditor directly
Establish a corresponding site in DW, the test server is native, and supports VBScript
Download FCKeditor 2.0. This thing is open source and there are many places you can download online. Find it yourself...
What you download should be a compressed package, decompressed to the root directory of the FCKeditor site, and you can start calling directly. When you know, you will find that it is so simple that you will die!
In the site root directory, create a new page and add the following code to the segment (call the editor):
Copy the codeThe code is as follows:
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
= "/FCKeditor/" //Set the editor path, a directory under the root directory of my site
= "Default"
= "100%"
= "600"
= "" //This is the initial value for the editor
"logbody" //In the future, the content in the editor will be obtained by this logbody, and the name will be determined by you
%>
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
= "/FCKeditor/" //Set the editor path, a directory under the root directory of my site
= "Default"
= "100%"
= "600"
= "" //This is the initial value for the editor
"logbody" //In the future, the content in the editor will be obtained by this logbody, and the name will be determined by you
%>
If you add this paragraph, don't forget to add it in the first second line.
Copy the codeThe code is as follows:
<!--#include file="FCKeditor/" -->
Include it. Remember to remember!
It's that simple!
Now you just use this editor as a control, and use: request("logbody") when extracting its data.
Now let's breathe a sigh of relief. The test was successful. There are some settings inside, please go to the Internet to find some advanced instructions for use.
Preliminary use of FCKeditor
FCKeditor 2.0 version has finally come out. The reason why the word "final" is used is because the popular Flash insertion function is added to this version. It can be said that among all online editors, FCKeditor is currently the best editor on the Internet. It has powerful functions and supports multiple browsers. It has no platform restrictions. It can be integrated with multiple WEB languages, multi-language support, open source, etc.
For a brand new website, FCKeditor can be used directly, without any modifications. However, for most existing websites, some settings of FCKeditor are not suitable for your own use. This article aims to tell you to simply modify FCKeditor to facilitate the use of your website.
The first job is to streamline this large-scale editor, of course, it is to streamline files rather than functions. Here I take the asp version of FCKeditor as an example, enter the FCKeditor 2.0 folder, and first delete all the folders starting with "_". These folders contain examples or some other tools. In fact, it is just to keep the editor folder, , , , , , . After the outermost simplification is completed, enter the editor folder and delete the "_source" folder first. Here are some source files, which are of no use for use.
Enter the images folder and delete the smiley folder. Some files are placed with emoticons. Since I will use my own emoticons to delete them first. Of course, if you want to use the emoticons here, don't delete them. Exit images and enter the lang folder. You can clean up the things here. Only these four files are retained. The first file is the language configuration file. With it, you can set it to the corresponding corresponding language file. It is a simplified Chinese language package. Needless to say, it is from traditional Chinese. How about it? I lost a few hundred K at once, so it's great~
Exit the lang folder and enter the skin folder. If you want to use the default yellow color of fckeditor, then delete the other two folders except the default folder. If you want to use something else, then consider it yourself. But I would like to give you a suggestion. If you don’t want to use the default one, then choose the silver, because silver, that is, gray, and any color will not be difficult to match. I don’t like the skin of office2003 anyway, and the picture is relatively large, which increases the download time. Don’t!
The last step to simplify it is to exit the skin folder and then enter filemanager. If you are not using the latest version of fckeditor, then there is a folder browser here, and the new version also has an upload folder. Come one by one, first enter filemanager/browser/default/connectors/. Because I use asp, I delete all except the asp folder. Then enter filemanager/upload/, and then leave only the asp folder. At this point, the editor simplification has ended. Next, we will make settings and modifications to the editor.
The first modified file, which is the total configuration file of the fckeditor, is located in the root directory. Please follow the list below (whichever is the case with fckeditor version 2.0):
Find line 20 = 'en' ; Change to = 'zh-cn' ; Set the default language to Simplified Chinese
Find line 40 = 0; change to = 1; that is, you can use the Tab key in the editor domain.
If your editor is still used in the front desk of the website, such as when using a message book or a diary reply, you have to consider security. Don’t use the Default toolbar in the front desk. You either customize the functions or use Basic, which is the basic toolbar that has been defined by the system.
Found line 64 ["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-',/*'Link', */'Unlink','-','Style','FontSize','TextColor','BGColor','-','Smiley','SpecialChar','Replace','Preview']
] ;
This is the Basic I have changed. Remove the image function and the link addition function, because the image and link, the Flash and image button addition functions can allow the front desk page to directly access and upload files. If you don't change here, you will upload a * to you and don't finish playing immediately? But this is not enough. Fckeditor also supports the right mouse button function in the editing domain.
Found line 73
= ['Generic',/*'Link',*/'Anchor',/*'Image',*/'Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField',/*'ImageButton',*/'Button','BulletedList','NumberedList','TableCell','Table','Form'] ;
This is also what I have changed to remove the "link, image, Flash, image button" functions of the right mouse button.
Found line 77 = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
Add several fonts we commonly use = 'Song font; bold font; official script; Kai font_GB2312; Arial; Comic Sans MS; Courier New; Tahoma; Times New Roman; Verdana'; ;
Next, we will set up the upload function. Take ASP as an example. In fact, the default fck is asp. Just delete all commented codes below 100 lines, and then change all the following related and related ?Type=XX to Type=YY, where YY is the name of the folder you want to save the file.
If you still want to use your own emoticon icon, then jump to line 131 and change the folder address of the emoticon icon and the file name of the emoticon icon below. The three numbers below are the number of emoticons displayed in each line and the width and height of the pop-up window. The size of this depends on the size of the window arranged by your emoticon icon. OK, the total configuration file modification has ended.
Next is the setting of the editor location. My habit is to place the editor in the root directory, and the five files mentioned at the beginning are also placed in the root directory (Tips: It is recommended to place it in the root directory, and it is recommended to set the path to use the absolute path, such as "/fckeditor/", while my habit is "/"). This is conducive to the update and upgrading of fckeditor, and all folders under the website can be called arbitrarily, and there is no problem that other folder names change and the editor cannot be used elsewhere.
Open the file and find sBasePath = "/fckeditor/" to sBasePath = "/"
Open the file and find = '/fckeditor/' ; Change to = '/' ;
The default display font in the editor domain is 12px, while the default font on my home page is 14px, so it feels very uncomfortable to look at it. If you want to modify it, you can achieve the requirements by modifying the style sheet. Open /editor/css/fck_editorarea.css and change line 4 to font-size: 14px;.
Next is the setup for uploading files. This is more troublesome, please operate carefully.
Open \editor\filemanager\browser\default\, find line 15, insert "['uploadfile','uploadfile']," and match the settings just now. Then my upload file path is /uploadfile. Of course, you can also change it to the folder you want, but the name here must be consistent with the YY in "Type=YY".
Not finished yet, continue to enter editor\filemanager\browser\default\connectors\asp, open it, first change ConfigIsEnabled = False to ConfigIsEnabled = True. If the file is not impossible, then change ConfigUserFilesPath = "/UserFile" to the ConfigUserFilesPath = "/" I want.
Then add "uploadfile", "" after "Set ConfigDeniedExtensions = CreateObject( "" )"
"uploadfile", ""
Similarly, the settings here must correspond to the above and inside.
There is another upload, which is a quick upload. This function is only available in fckeditor 2.0. Previous versions did not have this function. Enter \editor\filemanager\upload\asp, and open it, and set ConfigIsEnabled = False to ConfigIsEnabled = True. I changed ConfigUserFilesPath = "/UserFiles/" to the ConfigUserFilesPath = "/uploadfile/"& Year(Date()) &"-"& Month(Date()) &"/" because my upload file is placed in the uploadfile folder and is open to it by month. Quick upload will not allow you to select a folder, but will be uploaded directly through the settings here. If the settings here are not well matched with the previous settings, your files will be uploaded in a mess and inconvenient to manage. Repeat the operation in the previous one before the connection, and add it to the next
"uploadfile", ""
"uploadfile", ""
Next, let’s talk about how to create your own online editor. Here we take ASP and JS versions as examples, ASP version sample code, which is generally used for background operations:
Copy the codeThe code is as follows:
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
= "/"
= "Default"
= "100%"
= "400"
= rs("logbody")
"logbody"
%>
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
= "/"
= "Default"
= "100%"
= "400"
= rs("logbody")
"logbody"
%>
Of course, the ASP version can only be used in pages with .asp as the extension. If you set BasePath to "/" in the previous section, you can save the third line here. The ASP version only has one Create function. It is recommended to use the ASP version when modifying a content.
Next, let’s look at the JS version:
Copy the codeThe code is as follows:
<script type="text/javascript">
var oFCKeditor = new FCKeditor( 'logbody' ) ;
= '/' ;
= 'Basic' ;
= '100%' ;
= '400' ;
= '' ;
() ;
</script>
The settings of BasePath are as mentioned above. The JS version can be used in any web page, or even html pages, because it is generated by the client. The advantage is that it can reduce network traffic, because the editor file only needs to be downloaded once, and the second is that it can be defined by the client when it is displayed. Since fckeditor initialization takes a certain amount of time, JS is very useful at this point.
In addition, there is another function function in the JS version, which is the ReplaceTextarea() function, which can replace the specified TextArea and take the reply part of my website's log:
Copy the codeThe code is as follows:
<script type="text/javascript">
<!--
function showFCK(){
var oFCKeditor = new FCKeditor( 'fbContent' ) ;
= '/' ;
= 'Basic' ;
= '100%' ;
= '200' ;
= '' ;
//() ;
() ;
//document.blog_feedback. = '';
document.blog_feedback. = '';
document.blog_feedback. = 'true';
document.blog_feedback. = 'none';
}
//-->
</script>
Write it into a simple function, and the fckeditor is generated when the user displays the editor opens. Without initializing an editor every time the page is refreshed, the page will be much faster.
Supplement: As mentioned earlier, it is said that you should not use the JS version when editing existing data content. This is caused by the problem of single quotes ('). In the data content, there will inevitably be single quotes. When using JS version to generate an editor, the editor may not be able to generate normally due to single quotes. However, using asp is different. The ASP version is used because the data is regarded as a variable, and then it is directly assigned to the editor domain. Also, unless you want to use the ReplaceTextArea() method to generate the editor, you don’t need to write a tag like <textarea> first. Everything will be automatically generated by fckeditor. All you need to do is specify an instance name to fckeditor. At the same time, you don’t have to worry about how to submit. When the form is submitted, fckeditor will automatically submit, and the submitted variable name is named after the fckeditor instance you specified.