Cainiao: simple integration of ckfinder and ckeditor in ASP. NET
Ckeditor is a new generation of FCKeditor, which is a redevelopment version. Ckeditor is one of the world's best online text editors for Web pages. Ckfinder is a powerful Ajax File Manager.
I recently tried it in the project and shared it with you.
My projects:
(Note that I am in the Admin directory)
First, find ckfindor/bin/debug/ckfinder. dll and integrate it into your project.
Test Page code:
About. aspx <% @ page Language = "C #" autoeventwireup = "true" codefile = "about. aspx. cs" inherits = "admin_companyinfo_about" validaterequest = "false" %>
<! 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 runat = "server">
<Title> No title page </title>
<SCRIPT type = "text/JavaScript" src = "../ckeditor. js"> </SCRIPT>
<SCRIPT type = "text/JavaScript" src = "../ckfinder. js"> </SCRIPT>
</Head>
<Body>
<Form ID = "form1" runat = "server">
<Asp: textbox id = "textbox1" runat = "server" width = "596px" textmode = "multiline"> </ASP: textbox>
<SCRIPT type = "text/JavaScript">
Ckeditor. Replace ('<% = textbox1.clientid %> ',{
Toolbar: 'full ',
Filebrowserbrowseurl: '../ckfinder/ckfinder.html ',
Filebrowserimagebrowseurl: '../ckfinder/ckfinder.html? Type = images ',
Filebrowserflashbrowseurl: '../ckfinder/ckfinder.html? Type = flash ',
Filebrowseruploadurl: '../ckfinder/CORE/connector/aspx/connector. aspx? Command = quickupload & type = files ',
Filebrowserimageuploadurl: '../ckfinder/CORE/connector/aspx/connector. aspx? Command = quickupload & type = images ',
Filebrowserflashuploadurl: '../ckfinder/CORE/connector/aspx/connector. aspx? Command = quickupload & type = flash'
});
</SCRIPT>
<Div style = "position: absolute; left: 50%"> <asp: button id = "button1" runat = "server" text = "Submit" onclick = "button#click"/> & nbsp; & nbsp <asp: button id = "button2"
Runat = "server" text = "return" onclick = "button2_click"/>
</Div>
</Form>
</Body>
</Html>
. If you use all the toolbar, the toolbar: 'full ',
. If you use the basic toolbar, the toolbar is 'basic ',
Expand the ckfinder directory
Open config. ascx
1. Change retrue to true by default.
2. Modify the baseurl according to the actual situation.