Freetextbox is no longer open-source, and csdn uses this online editor. Its name is FCKeditor, which is open-source.
FCKeditor
Fck composition:
1. fck core file (including images, JS ...)
2. fck. Net file (just a DLL named fredck. fckeditorv2.dll)
Fck Installation
Official Website http://www.fckeditor.net/
Official Document http://wiki.fckeditor.net/
Enter a title with more than 5 Characters
Another one is fck.net, which is shown below, without the picture...
Fck Installation
After the files are downloaded, decompress the files in the core folder. JS and. do not change the XML and editor folders. You can delete other files, but we do not recommend that you do this .. because fck is suitable for many languages (such as ASP, PHP ...) you can see that other files are used to work in other languages ..
There is only one DLL file in. net, in the FCKeditor. net_2.2 \ bin \ DEBUG directory of fredck. fckeditorv2.dll...
Modify the following sections in fckconfig. js and change ASP of both rows to aspx...
VaR _ filebrowserlanguage = 'asp '; // ASP | aspx | CFM | lasso | Perl | PHP | py
VaR _ quickuploadlanguage = 'asp '; // ASP | aspx | CFM | lasso | PHP
Open the Web. config file of the fckpro project and modify the appsettings element. The configuration is as follows:
<Deleetask>
<Add key = "FCKeditor: basepath" value = "~ /FCKeditor/"/>
<Add key = "FCKeditor: userfilespath" value = "/fckpro/Files"/>
</Appsettings>
The purpose of configuring web. config is to use its powerful file upload function...
Reference this DLL in the project and reference it in the control so that you can use it ..
As for how to get its content, it is very easy to just get a word fckeditor1.value.
The following is the code page ..
Default. aspx |
---------------------- |
<% @ Page Language = "C #" validaterequest = false autoeventwireup = "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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head id = "head1" runat = "server">
<Title> FCKeditor Text Editor </title>
</Head>
<Body>
<Form ID = "form1" runat = "server">
<Div>
<Fckeditorv2: FCKeditor id = "fckeditor1" runat = "server" defaultlanguage = "ZH-CN" Height = "400px" width = "660px"
> </Fckeditorv2: FCKeditor>
<Input type = submit/> </div>
</Form>
</Body>
</Html>
Default. aspx. CS |
------------------------ |
Using system;
Using system. Data;
Using system. configuration;
Using system. collections;
Using system. Web;
Using system. Web. Security;
Using system. Web. UI;
Using system. Web. UI. webcontrols;
Using system. Web. UI. webcontrols. webparts;
Using system. Web. UI. htmlcontrols;
Using system. Data. oledb;
Public partial class _ default: system. Web. UI. Page
{
Protected void page_load (Object sender, eventargs E)
{
String strsql = "select ID, news from Guestbook ";
String conn = "provider = Microsoft. Jet. oledb.4.0; Data Source =" + server. mappath (".") + ". \ dB. mdb ;";
Oledbconnection objconn = new oledbconnection (conn );
Oledbdatareader objreader = NULL;
Oledbcommand mycmd = new oledbcommand (strsql, objconn );
Objconn. open ();
Objreader = mycmd. executereader ();
Objreader. Read ();
Objreader. Read ();
Objreader. Read (); // This is because I want to view 5th data records in the database.
Objreader. Read ();
Objreader. Read ();
Fckeditor1.value = (string) objreader ["news"];
Objreader. Close ();
Objconn. Close ();
}
}
The following is the standard process:
Http://dl2.csdn.net/down4/20070713/13204720486.rar