Use FCKeditor in Asp.net C #, version 2.66
The most popular text editor is probablyFCKeditor. Its official website isWww.fckeditor.net. You can download the latest FCKeditor from the official website. The download page isHttp://www.fckeditor.net/download. The latest FCKeditor version is 2.66. Be sure to download another item. Find FCKeditor. NET and download the latest control.
In this case, you have two packages: fckeditor_2.66.zipand fckeditor.net_2.64.zip.
1,Decompress fckeditor_2.66.zip and copy the decompressed FCKeditor folder to our website. Note that it is best to place FCKeditor in the root directory of the website.
2,Decompress fckeditor_net.zip. You will see a file named fredck. fckeditorv2.dll (probably because the versions have slightly different names ). Now we need to add it to reference our website. In Solution Explorer, right-click the project name and select Add reference. In the displayed dialog box, select the Browse tag, find the DLL file, and click OK. You will find that the website has a directory named bin, where fredck. fckeditorv2.dll is located.
3,Open the toolbox, right-click the Add tab, name it webeditor, and click OK. On this tab, right-click and select an item. In the displayed dialog box, browse and find the DLL file, and click OK. Then you can see that the FCKeditor tab has a control named FCKeditor.
4,Using this control is simple. Just like using other. Net controls, you can drag it to the page.
InCodeAs follows:
<Div>
<% -- FCKeditor text editor -- %>
<Fckeditorv2: FCKeditor id = "cfckeditor" runat = "server" Height = "300px" width = "600px" basepath = "~ /FCKeditor/"/>
</Div>
Note that you need to configure several parameters. basepath as the reference address, which varies with the location of the FCKeditor folder. In addition, there are many parameters, such as setting the default language, uploading the image path, and whether full screen display is supported... waiting. I will not list them here.
5,If you want to configure parameters such as bashpath every time, you can add the configuration information to the config file. The Code is as follows:
<Deleetask>
<Add key = "FCKeditor: basepath" value = "~ /FCKeditor/"/>
<Add key = "FCKeditor: userfilespath" value = "/newsimage/"/> // set the attachment upload address.
</Appsettings>
6,There are also 1.1 precautions. Sometimes you need to use FCkeditorAdd validaterequest = "false" to the top page element of the page ". In this way, "request. Form values that are potentially dangerous are not detected ." .
7,Use FCKeditor. Value to obtain the value in the FCKeditor editor. GET htmlSource code.
Actually, FCkeditorI still have a lot of knowledge. For example, FCKeditor can lose weight, change skin, and customize its own functions. LaterArticleI will introduce it to you one after another.