Web工程目录demo,解压FCKeditor_2.2.zip,保存在demo/FCKeditor下。用户上传文件目录demo/UserFiles。 1,设置 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,解压FCKeditor.Net_2.2.zip,修改其中的文件重新生成dll文件 2.1修改FCKeditor.cs中的basepath属性
[ DefaultValue( "~/FCKeditor/" ) ]
public string BasePath
{
get
 {
object o = ViewState["BasePath"] ;

if ( o == null )
o = System.Configuration.ConfigurationManager.AppSettings["FCKeditor:BasePath"] ;

return ( o == null ? "~/FCKeditor/" : (string)o ) ;
}
 set { ViewState["BasePath"] = value ; }
}

2.2修改FileWorkerBase.cs增加成员变量private const string DEFAULT_USER_FILES_DIR = "/UserFiles/"; 增加属性
protected string UserFilesDirectoryForUpload
{
get
 {
return Server.MapPath(DEFAULT_USER_FILES_DIR);
}

}
在UserFilesPath属性中增加return Request.ApplicationPath + DEFAULT_USER_FILES_DIR; 2.3修改Uploader.cs将string sFilePath = System.IO.Path.Combine(this.UserFilesDirectory, sFileName);改为string sFilePath = System.IO.Path.Combine(this.UserFilesDirectoryForUpload, sFileName); 3,解决FCKEditor上传时中文文件名的方法 主要是修改文件frmUpload.html文件.修改方法是:先把frmUpload.html文件重新命名,然后添加一个aspx页面文件,把上面的内容复制到aspx页面文件中,最后把新添加的aspx文件后缀改为html即可.修改后的文件内容如下: <%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
|