Program version: 2.3.2 released
Control version: FCKeditor. Net 2.2
Official Address: http://www.fckeditor.net/
: Http://www.fckeditor.net/download/default.html
Control
Address: http://sourceforge.net/project/showfiles.php? Group_id = 75348 & package_id = 75845
Show
Address: http://www.fckeditor.net/demo/default.html
I. Preparations
First download FCKeditor v2.3.2
Released. This compressed package does not contain the DLL control to be used by. net, so you need to download another compressed package, in the above control address. Set "first"
Files are decompressed to the web root directory. The default folder is FCKeditor. decompress the second package, which contains the source code. If you want to develop the package again, double-click
Fredck. fckeditorv2.csproj file, open vs. NET and modify it. The language used is C #. If you do not want to modify it, directly put bin/release
Copy the following fredck. fckeditorv2.dll file to the bin in the web directory.
Ii. Streamline files
Because only ASP. NET is used, it is necessary to streamline the file.
Go to the FCKeditor folder and delete all files and folders starting "_".
Is some examples, only the Editor folder, fckconfig. JS, FCKeditor. JS, fckstyles. XML,
Fcktemplates. xml;
Go to the Editor folder and delete the "_ source" folder, which also contains the source file;
Return
Go back to the upper-level directory and enter the filemanager folder. There are two folders: browser and upload. Go to Browser/Default
/Connectors: only the aspx folder is retained, and the rest can be deleted; the mcpuk directory can also be deleted; the same is true for upload, and only the aspx folder is retained;
Return
Editor then enters the images folder. The smiley folder contains emoticon icons, including MSN and fun series. If you want to use your own emoticon icons, you can delete them.
If you want to use the emoticon icon here, do not delete it;
Lang contains a Language Pack. If only simplified Chinese characters are used, only
Fck1_agemanager. JS, zh-cn.js two files on the line, it is recommended to retain en. js (English), Zh. js (Traditional Chinese) Two files
Fcklanguagemanager. JS is a language configuration file. With this file, it can be paired with the settings in fckconfig. js. The corresponding language file must be kept
Stay!
Then exit the Lang folder and enter the skins folder. If you want to use the default FCKeditor milk yellow, put the other two folders except the default folder
Delete folders directly. If you want to use other folders, it depends on your preferences.
So far, the file has been streamlined, from the original 2.55m to the current 797k. Then modify the settings.
3. Modify settings
Open the fckconfig. js file in the root directory. Fckconfig. skinpath = fckconfig. basepath +
'Skins/default /'
This line is set to skin. If silver is retained during streamlining, change the path to skins/silver. By default, you don't need to worry about it.
Fckconfig. defaultlanguage = 'en'
Set the default language, and change en to ZH-CN, that is, simplified Chinese; fckconfig. tabspaces = 0; if you need to use the tab key during editing, change 0 to 1;
Because FCKeditor is ASP by default, You need to replace it with ASP. NET. Delete ASP and other commented-out codes, and use ASP. NET instead. For example:
Fckconfig. linkbrowserurl
= Fckconfig. basepath +
'Filemanager/Browser/default/browser.html? Connector = connectors/asp/connector. asp'
;
// Fckconfig. linkbrowserurl = fckconfig. basepath +
'Filemanager/Browser/default/browser.html? Connector = connectors/asp/connector. ASP & serverpath
=/Customfiles /'
;
// ASP. NET // fckconfig. linkbrowserurl = fckconfig. basepath +
'Filemanager/Browser/default/browser.html? Connector = connectors/aspx/connector. aspx'
;
// ColdFusion // fckconfig. linkbrowserurl = fckconfig. basepath +
'Filemanager/Browser/default/browser.html? Connector = connectors/cfm/connector. cfm'
;
// Perl // fckconfig. linkbrowserurl = fckconfig. basepath +
'Filemanager/Browser/default/browser.html? Connector = connectors/perl/connector. cgi'
;
// PHP // fckconfig. linkbrowserurl = fckconfig. basepath +
'Filemanager/Browser/default/browser.html? Connector = connectors/PHP/connector. php'
;
// PHP-mcpuk // fckconfig. linkbrowserurl = fckconfig. basepath +
'Filemanager/Browser/mcpuk/browser.html? Connector = connectors/PHP/connector. php'
;
Retain only:
Fckconfig. linkbrowserurl = fckconfig. basepath +
'Filemanager/Browser/default/browser.html? Connector = connectors/aspx/connector. aspx'
;
The rest of the Code follows the above steps to delete other Web languages and only retain ASP. NET. You can also click here to download my streamlined files. Note: it is only applicable to ASP. NET. Its
He has no language! We recommend that you decompress the file to another directory and copy it to the corresponding location of the web directory to avoid file loss.
Save the changes. FCKeditor fully supports
ASP. NET. Of course, there are still some security issues, as long as you modify the corresponding toolbar, right-click the menu, and so on, because my background does not face the front-end users, that is, there is no message book or diary reply
To skip these steps. The next step is to open vs. NET and add FCKeditor to the ASP. NET page.
Iv. ASP. NET Applications
Open the "Resource Manager" of the project and add the "fredck. fckeditorv2" reference. Create a page and add a reference to fck. The Code is as follows:
<% @ Register tagprefix = "fckeditorv2"
Namespace = "fredck. fckeditorv2" assembly = "fredck. fckeditorv2" %>
And make sure that @
The "autoeventwireup" and "validaterequest" values in the page are both false. Otherwise, when your post contains links or other
When using HTML statements,. NET will warn you of security risks and errors. Add the FCKeditor Control to the proper position of form. Of course, form must have
"Runat =" server ", the Code is as follows:
<Fckeditorv2: FCKeditor id = "content"
Runat = "server"> </fckeditorv2: FCKeditor>
You can name the ID by yourself. If the program detects whether the input is null, it is no longer content. text,
Content. value.
So far, the file has been modified. All code is as follows:
<% @ Page Language = "C #" contenttype = "text/html"
Responseencoding = "gb2312" %>
<% @ Register
Tagprefix = "fckeditorv2" namespace = "fredck. fckeditorv2"
Assembly = "fredck. 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>
<Meta
HTTP-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title>
Untitled document </title>
</Head>
<Body>
<Script
Language = "C #" runat = "server">
Void button#click (Object
Sender, eventargs E)
{
Label1.text = content. value;
}
</SCRIPT>
<Form
Id = "form1" runat = "server">
<Fckeditorv2: FCKeditor id = "content"
Runat = "server"
Basepath = "~ /FCKeditor/"> </fckeditorv2: FCKeditor>
<Asp: button
Id = "button1" runat = "server" text = "hit"
Onclick = "button#click"> </ASP: button>
<Asp: Label
Id = "label1" runat = "server"> </ASP: Label>
</Form>
</Body>
</Html>