FCKeditor usage)

Source: Internet
Author: User

FCKeditor

Fck composition:

1. fck core file (including images, JS ...)

2. fck. Net file (just a DLL named fredck. fckeditorv2.dll)

Fck Installation

Official WebsiteHttp://www.fckeditor.net/

Official documentationHttp://wiki.fckeditor.net/

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

OpenFckproEngineeringWeb. configFile, modifyAppsettingsThe configuration is as follows: <Appsettings> <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.

Below isCodePage ..

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

Trackback: http://tb.blog.csdn.net/TrackBack.aspx? Postid = 1702421

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.