FCKeditor is a powerful text editor that supports WYSIWYG and provides users with online document editing services like Microsoft office software. It is compatible with most mainstream browsers and supports programming environments such as ASP. NET, ASP, ColdFusion, PHP, Java, active-FoxPro, lasso, Perl, and ython.
Official Website http://www.fckeditor.net/
Official Document http://wiki.fckeditor.net/
Http://www.fckeditor.net/download/default.html
FCKeditor installation and configuration
Download two zip packages for fckeditor2.63.zip and FCKeditor. net2.63
(A) fckeditor_2.6.3 is a resource file such as HTML files, JavaScript files, and images.
(B) fckeditor.net_2.6.3.zip is an ASP. NET control DLL file.
Add reference to FCKeditor in ASP. NET Project
1. Select Add reference... for the project ...), Find the Browse tab, locate the extracted fredck. fckeditorv2.dll, and click OK.
2. to facilitate rad development, you can also add the FCKeditor Control to the toolbox of Vs, expand the common label Group of the Toolbox (general), right-click the component and choose items ...), Find the Browse button in the dialog box, locate fredck. fckeditorv2.dll, and then confirm it.
3. Configure web. config and add it to the <etettings> node, as shown below:
<Appsettings>
<Add Key="FCKeditor: basepath" Value="~ /Web/FCKeditor /"/>
<Add Key="FCKeditor: userfilespath" Value="~ /Web/upload /" />
</Appsettings>
FCKeditor Configuration:
Go to the FCKeditor folder and edit the fckconfig. js file.
1. Modify:
VaR _ filebrowserlanguage = 'php'; // ASP | aspx | CFM | lasso | Perl | PHP | py
VaR _ quickuploadlanguage = 'php'; // ASP | aspx | CFM | lasso | PHP
Is:
VaR _ filebrowserlanguage = 'aspx '; // ASP | aspx | CFM | lasso | Perl | PHP | py
VaR _ quickuploadlanguage = 'aspx '; // ASP | aspx | CFM | lasso | PHP
2. configuration language
Modify:
Fckconfig. defaultlanguage = 'en ';
Changed:
Fckconfig. defaultlanguage = 'zh-cn ';
3. Configure the skin, including default, office2003, and silver style. You can use the default style.
Fckconfig. skinpath = fckconfig. basepath + 'Skins/default /';
4. You can use the tab key in the editor. (1 is yes, 0 is no)
Change fckconfig. tabspaces = 0; To fckconfig. tabspaces = 1;
5. add several common fonts:
Fckconfig. fontnames = '; _ gb2312; Arial; Comic Sans MS; Courier New; tahoma; Times New Roman; verdana ';
6. The default font in the editor is 12px. You can modify the style sheet to meet the requirements. Open/Editor/CSS/fck_editorarea.css and modify the font-size attribute.
7. Security
If your editor is not authenticated at the front end, we recommend that you use the basic toolbar.
Fckconfig. toolbarsets ["Basic"] = [
['Bold ', 'italic', '-', 'orderedlist', 'unorderedlist', '-', 'link', 'unlink', 'image ', '-', 'about']
];
8. Click Browse server in the Upload File window.The server didn't send back a proper XML .....The error message is that FCKeditor requires different types of files to be uploaded to different directories, including directories such as file, image, falsh, and media. You can create them first.
Security Configuration of FCKeditor. Net 2.6
File Upload is always an easy-to-use attack Channel:
Open Editor/filemanager/connectors/aspx/config. ascx
Private Bool Checkauthentication ()
{
// To prevent arbitrary users from opening the upload page or browsing server files
// We recommend that you integrate the permission here with your background management permissions. If verification is not required, you can directly return true.
//------------------------------------------------
// 1. Assume that you use session to store user login authentication information, and assume that the session key is Auth.
// Return
// Return (session ["auth"]! = NULL & session ["auth"] = "Verification value ");
// 2. If you use Form Verification, you can verify
// Return page. User. Identity. isauthenticated;
// Warning: do not simply return "true". By doing so, you are allowing
// "Anyone" to upload and list the files in your server. You must implement
// Some kind of session validation here. Even something very simple...
//
// Return (session ["isauthorized"]! = NULL & (bool) session ["isauthorized"] = true );
//
//... Where session ["isauthorized"] is set to "true" as soon as
// User logs in your system.
Return True ;
}
I will describe and use the previous section in Chinese.
Streamline and clean FCKeditor
Go to the FCKeditor folder and delete all files and folders starting with "_". These are examples. Only the Editor folder and fckconfig are retained. JS, FCKeditor. JS, fckstyles. XML, fcktemplates. XML is enough;
Go to the Editor folder and delete the "_ source" folder, which also contains the source file;
Go back to the upper-level directory and enter the filemanager folder. There are two folders: browser and upload. Go to Browser "default" connectors, and retain only the aspx folder, and delete the rest; The mcpuk directory can also be deleted; the same is true for upload, and only the aspx folder;
Return to the editor and enter the images folder. The smiley folder contains emoticon icons, including MSN and fun. If you want to use your own emoticon icons, you can delete them; if you want to use the emojis here, do not delete them;
Lang contains a Language Pack. If only simplified Chinese characters are used, only fck1_agemanager is retained. JS, zh-cn.js two files on the line, it is recommended to keep en. JS (English), Zh. JS (Traditional Chinese) files, fck1_agemanager. JS is a language configuration file. With it, it can be used with fckconfig. JS settings are paired, corresponding to the corresponding language file, must be retained!
Exit the Lang folder and enter the skins folder. If you want to use the default FCKeditor milk yellow, delete the other two folders except the default folder. If you want to use other folders, it depends on your preferences.
Lite version and instance download
Author: deltacat
ArticleSource: Really interesting Network (http://www.zu14.cn)
Reference address: Click to copy the trackback URL of this Article
Article link: http://www.zu14.cn/2009/01/19/fckeditor-net-config/ [copy] (reprinted please indicate the source and link)