The webproject directory demo, decompress fckeditor_2.2.zip, and save it under demo/FCKeditor. The user uploads the file directory demo/userfiles.
1. Set
Editor. linkbrowserurl = request. applicationpath + "/FCKeditor/Editor/filemanager/Browser/default/browser.html? Connector = connectors/aspx/connector. aspx ";
Editor. imagebrowserurl = request. applicationpath + "/FCKeditor/Editor/filemanager/Browser/default/browser.html? Type = Image & connector = connectors/aspx/connector. aspx ";
2. Decompress fckeditor.net_2.2.zip and modify the file to regenerate the DLL file.
2.1 modify the basepath attribute in FCKeditor. CS.
[Defaultvalue ("~ /FCKeditor/")]
Public String basepath
{
Get
{
Object o = viewstate ["basepath"];
If (O = NULL)
O = system. configuration. configurationmanager. receivettings ["FCKeditor: basepath"];
Return (O = NULL? "~ /FCKeditor/": (string) O );
}
Set {viewstate ["basepath"] = value ;}
}
2.2 modify fileworkerbase. CS to add the member variable private const string default_user_files_dir = "/userfiles /";
Add attribute
Protected string userfilesdirectoryforupload
{
Get
{
Return server. mappath (default_user_files_dir );
}
}
Add return request. applicationpath + default_user_files_dir in the userfilespath attribute;
2.3 modify uploader. CS sets string sfilepath = system. io. path. combine (this. userfilesdirectory, sfilename); changed to string sfilepath = system. io. path. combine (this. userfilesdirectoryforupload, sfilename );
3. The solution for FCKeditor to upload a Chinese file name
The main modification file is the frmupload.html file. the modification method is as follows: Rename the frmupload.html file, add An ASPX page file, copy the above content to the ASPX page file, and change the suffix of the newly added aspx file to HTML. the modified file content is as follows:
<% @ Page Language = "C #" %>
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en ""