Asp.net uses ckfinder (ckeditor3.1.2 collection ckfinder2.1.1) in ckeditor to perfectly combine

Source: Internet
Author: User

From: http://www.cnblogs.com/ndxsdhy/archive/2011/07/10/2102124.html

1. Download The ckfinder package and put it into the website http://ckfinder.com/

2. Delete the _ samples and _ source folders (Example files and uncompressed sourcesProgram)Otherwise, compilation will fail.

3. add reference to the ckfinder \ bin \ debug \ ckfinder. dll file to the website.

4. add reference to the pageCode<SCRIPT type = "text/JavaScript" Language = "JavaScript" src = "ckfinder/ckfinder. js"> </SCRIPT>

5. add several pieces of code to the config. js file of ckeditor, such:

Ckeditor. editorconfig = function (config ){
// Define changes to default configuration here. For example:
// Config. Language = 'Fr ';
// Config. uicolor = '# aadc6e ';
// The following items need to be added:

Config. filebrowserbrowseurl = '/ckfinder/ckfinder.html ';
Config. filebrowserimagebrowseurl = '/ckfinder/ckfinder.html? Type = images ';
Config. filebrowserflashbrowseurl = '/ckfinder/ckfinder.html? Type = flash ';
Config. filebrowseruploadurl = '/ckfinder/CORE/connector/aspx/connector. aspx? Command = quickupload& Type= Files ';
Config. filebrowserimageuploadurl = '/ckfinder/CORE/connector/aspx/connector. aspx? Command = quickupload& Type= Images ';
Config. filebrowserflashuploadurl = '/ckfinder/CORE/connector/aspx/connector. aspx? Command = quickupload& Type= Flash ';

// After adding the file, you will find that "Upload" is added to the ckeditor box"
};
6. modify the content in config. ascx of ckfinder and change "Return false" in public override bool checkauthentication () to "Return true". Otherwise, you do not have the permission.

7. You can modify baseurl = "/ckfinder/userfiles/" in config. ascx of ckfinder. It isServer File Path, used to store image folders

8. It is almost ready for use. Pay attention to the address in step 1. If the ckeditor text box is used in the user control, the path should be written according to the webpage that references the user control (directly upload the image through the first "image"-browse the server, so that the path can be displayed if the page fails)

Appendix:Ckfinder streamlined
1. Delete the _ samples and _ source folders, which are the sample files and uncompressed source programs respectively.
2. Delete the changelog.txt, install.txt, and license.txt files from the root directory.
3. 1. delete the kernel/lang directory in Version X except en. JS, zh-cn.js of all language files (Delete according to conditions), 2.0 Delete Lang and Core/connector/aspx/lang directory except en. JS, all language files for the zh-cn.js; help directory other directories except en

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.