The latest version of FCKeditor is 2.6, but the dll version that supports. NET is 2.5. This article describes how to configure fckeditor2.6 in ASP. NET.
The example in this article (including the entire solution and website, which can be used after download ):
Address: http://www.china-aspx.com/Forum/showtopic-57.aspx
FCKeditor official: http://www.fckeditor.net/download
The configuration method is as follows:
1. Download from the official website
: Http://sourceforge.net/project/downloading.php? Group_id1_75348&filename=fckeditor_2.6.zip
Shows the directory structure after decompression:
Ii. Delete unnecessary files
The size of fckeditor2.6 downloaded from the official website is 3.61 MB (after decompression). In fact, many files are not required for ASP. NET only. We can delete unnecessary files:
1. In addition to the editor directory, fckconfig. JS, and FCKeditor. js fckstyles. xml fcktemplates. XML in the root directory, delete all the others.
2. Delete all files except the aspx 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.
4. Delete the _ samples directory. If you want to see the example, do not delete the directory.
Iii. Detailed settings of fckeditor2.6
1. Modify in fckconfig. js
Fckconfig. toolbarsets ["default"] = [
['Bold ', 'italic', 'underline', 'strikethangout', '-', 'subscript', 'superscript'],
['Orderedlist', 'unorderedlist', '-', 'outdent ', 'indent', 'blockquote'],
['Justifyleft', 'justifycenter', 'justifyright', 'justifyfull'],
['Link', 'unlink', 'anchor '],
['Image', 'flash', 'table', 'rule', 'smilil', 'specialchar ', 'pagebreak'],
'/',
['Style', 'fontformat', 'fontname', 'fontsize'],
['Textcolor', 'bgcolor'],
['Fitwindow', 'showbuckets', '-', 'about'] // No comma for the last row.
];
// I have removed some uncommon functions from the above section and can add them as needed.
Fckconfig. defaultlanguage = 'zh-cn'; // The original value is en.
VaR _ filebrowserlanguage = 'aspx '; // ASP | aspx | CFM | lasso | Perl | PHP | change py to aspx
VaR _ quickuploadlanguage = 'aspx '; // ASP | aspx | CFM | lasso | Perl | PHP | py
2. Add the DLL file to the bin.
DLL file: http://sourceforge.net/project/showfiles.php? Group_id = 75348 & package_id = 137125
3. Add the DLL file to the toolbar.
4. Configure the upload path
Edit FCKeditor \ editor \ filemanager \ connectors \ aspx \ config. aspx to modify
Private bool checkauthentication ()
{
// 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; // The original value is false. However, we recommend that you check the preceding warning.
}
Set in the setconfig Method
Userfilespath = "~ /Upload/FCKeditor "; // I set it in the upload/FCKeditor directory under the root directory of the website, depending on the actual situation and personal preferences.
Now, if you have any questions, go to http://www.china-aspx.com/forumto ask, or msn:china-aspx@hotmail.com.
The example in this article (including the entire solution and website, which can be used after download ):
Address: http://www.china-aspx.com/Forum/showtopic-57.aspx