ASP. net2.0 text editor FCKeditor (recommended)

Source: Internet
Author: User

FCKeditor is currently the best HTML text editor. If you still don't understand it, you will understand it.

Why is FCKeditor cold? This is not a big bang, it is a little troublesome to use, the following details how to deal with this stuff.

1. The official website of FCKeditor is:Http:// 
FCKeditor 2.4.2 is the latest version.
Download from this page:Http:// Group_id = 75348

Download two zip packages, and FCKeditor. net.

Note: is the latest Javascript file and image; is called by ASP. NET.DLLIn.

2.After the data is extractedFCKeditor directoryCopy the entire file to the website.

3.Decompress the package and find it in the FCKeditor. net_2.2/bin/DEBUG directory.Fredck. fckeditorv2.dll. Other files are useless.Fredck. fckeditorv2.dllCopy to our website and createBin directory.

4.ReferenceFredck. fckeditorv2.dll.
Step 1:

Step 2:

5. Import the toolbox.
Under the toolboxRight-click

Click "select item ". Pop-up window:

ClickBrowse and find the directory where the DLL is located.

The FCKeditor Control is displayed in the toolbox.

6. DragFCKeditor to the page

7. Configure webconfig
<? XML version = "1.0"?>
<! --
Note: In addition to manually editing this file, you can also use
Web management tools to configure application settings. You can use
"Website"-> "ASP. NET configuration" option.
The complete list of settings and comments is displayed in
In machine. config. Comments, this file is usually located in
/Windows/Microsoft. NET/framework/v2.x/config

<Add key = "FCKeditor: basepath" value = "~ /FCKeditor/"/>

<Add key = "FCKeditor: userfilespath" value = "/files/"/>


<System. Web>

Description: basepathIt is the path where FCKeditor is located. FCKeditor can be written in this way directly under the website directory. If your website has more layers, make appropriate adjustments.
UserfilespathIs the directory of all uploaded files.Why set to/files?This is not ~ /FilesFCKeditor uses this value to return the relative path of the uploaded file to the client. Otherwise, the user will retrieve the user's machine directory instead of the HTTP directory during access.

Suggestion: it is better to separate files into a site under the wwwroot Directory, which is parallel to our site FCKeditor. Don't put it in FCKeditor. Why? Because files requires the user to have the write permission, it is dangerous to put the files in FCKeditor.

8. The files directory must have the write permission. You can set the account based on your website requirements. This document makes it more reasonable to use an ASP. NET account to set the user conveniently.


9. Modify the FCKeditor/fckconfig. js file.
At the position of Row 3
VaR _ filebrowserlanguage = 'asp '; // ASP | aspx | CFM | lasso | Perl | PHP | py
VaR _ quickuploadlanguage = 'asp '; // ASP | aspx | CFM | lasso | PHP
VaR _ filebrowserlanguage = 'aspx '; // ASP | aspx | CFM | lasso | Perl | PHP | py
VaR _ quickuploadlanguage = 'aspx '; // ASP | aspx | CFM | lasso | PHP

10.FCKeditorGive itSlimming. All headers starting with _ are sample files or source files, but we recommend that you be careful.

11. The following example shows how to use the image,

Click Browse server ".

An error is easily reported in the pop-up window.

If the XML request error: internal server error (500) is reported, it is likely that the directory path is incorrect and the write permission is not available.

Select Image

Final Effect

Front-end code:

<% @ Page Language = "C #"Validaterequest = falseAutoeventwireup = "true" codefile = "default. aspx. cs" inherits = "_ default" %>

<% @ Register Assembly = "fredck. fckeditorv2" namespace = "fredck. fckeditorv2" tagprefix = "fckeditorv2" %>

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "">

<HTML xmlns = "">
<Head runat = "server">
<Title> FCKeditor Text Editor </title>
<Form ID = "form1" runat = "server">
<Fckeditorv2: FCKeditor id = "fckeditor1" runat = "server" defaultlanguage = "ZH-CN" Height = "400px" width = "660px"
> </Fckeditorv2: FCKeditor>


How to get resultsWhat about it?Fckeditor1.valueYes.

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: 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.