How to configure FCKeditor 2.6 in ASP. NET (with source code download)

Source: Internet
Author: User
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

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.