FCKeditor是一款跨平臺的在線編輯器,到我發佈本文,FCKeditor的官方版本已經發展到了2.6.4
將解壓後的FCKeditor_2.6b文件夾下的fckeditor拷貝到test目錄下,並從新命名爲FCKeditor。
將解壓後的FCKeditor-2.3文件夾下的web下的WEB-INF拷貝到test目錄下。
將FCKeditor-2.3文件夾下src下的FCKeditor.tld拷貝到test目錄下的WEB-INF下。
改以前:
35 <init-param>
36 <param-name>enabled</param-name>
37 <param-value></param-value>
38 </init-param>
改以後:
37 <param-value></param-value>
改以前:
66 <servlet-mapping>
67 <servlet-name>Connector</servlet-name>
68 <url-pattern>/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern>
69 </servlet-mapping>
70
71 <servlet-mapping>
72 <servlet-name>SimpleUploader</servlet-name>
73 <url-pattern>/editor/filemanager/upload/simpleuploader</url-pattern>
74 </servlet-mapping>
改以後:
68 <url-pattern>//editor/filemanager/browser/default/connectors/jsp/connector</url-pattern>
73 <url-pattern>//editor/filemanager/upload/simpleuploader</url-pattern>
修改第50行的FCKeditor.BasePath。
改以後:
50 FCKeditor.BasePath = 'FCKeditor/' ;(注意:FCKeditor以前是沒有/的)
修改FCKConfig.DefaultLanguage、FCKConfig.LinkBrowserURL、FCKConfig.ImageBrowserURL、FCKConfig.FlashBrowserURL、
改以後:
FCKConfig.AutoDetectLanguage = false ; :若是這裏沒有改成false編輯器是不會顯示爲中文的
FCKConfig.DefaultLanguage = 'zh-cn' ;
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + ‘filemanager/browser/default/browser.html?Connector=connectors/jsp/connector’;
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + ‘filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector’;
FCKConfig.FlashBrowserURL = FCKConfig.BasePath + ‘filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector’;
FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/simpleuploader?Type=File' ;
FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/simpleuploader?Type=Image' ;
FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/simpleuploader?Type=Flash' ;