fckeditor是sourceforge.net上面的一個開源項目,主要是實現(xiàn)在線網(wǎng)頁編輯器的功能,可以讓web程序擁有如ms word這樣強大的編輯功能。官方網(wǎng)站為http://www.fckeditor.net ,在服務(wù)器端支持asp.net、asp、clodfusion、php、java等語言,并且支持ie 5+、mozilla 、netscape等主流瀏覽器。
首先在官方網(wǎng)站下載fckeditor,注意有兩個包,一個是主文件,一個是jsp整合包的。
1、解壓fckeditor_2.2.zip,(fckeditor主文件),將fckeditor目錄復(fù)制到網(wǎng)站根目錄下,
2、解壓fckeditor-2.3.zip,(jsp,fckeditor整合包),作用:this is the jsp integration pack for using fckeditor inside a java server page without the complexity of using a java scriptlets or the javascript api.
3、將fckeditor-2.3/web/web-inf/web.xml中的兩個servlet,servlet-mapping定義復(fù)制到自已項目的web.xml文件中
修改
為
4、將fckeditor-2.3/web/web-inf/lib目錄下文件復(fù)制到自已項目的lib文件夾中
5、在需使用fckeditor的jsp界面中加入:
啟動服務(wù)器測試。。。。成功后,來給fckeditor瘦瘦身.
1、將fckeditor目錄下及子目錄下所有以”_”下劃線開頭的文件夾刪除
2.fckeditor根目錄下只保留fckconfig.js, fckeditor.js, fckstyles.xml, fcktemplates.xml其余全部刪除
3.將editor/filemanager/upload目錄下文件及文件夾清空.
4.還可以將editor/skins目錄下的皮膚文件刪除,只留下default一套皮膚(如果你不需要換皮膚的話)
5.還可以將editor/lang目錄下文件刪除,只保留en.js, fcklanguagemanager.js, zh-cn.js, zh.js文件(英文,簡體中文,繁體中文一般應(yīng)該夠用了:) )
完成,現(xiàn)在看是不是清爽了很多?
其它問題:
在struts+spring+hibernate中使用,上傳圖像功能中可能會出現(xiàn)報:
the output format must have a ‘{http://xml.apache.org/xalan}content-handler’ property!
錯的情況,將web-inf/lib目錄下xalan*.jar刪除試試
安全問題:
假如在前臺讓普通用戶也能使用fckeditor,要注意相關(guān)安全問題,在前臺使用時,不要使用默認(rèn)的toolbar,
要將添加圖像,flash,圖像域按鈕去掉
在fckconfig.js中大約78行配置 那些數(shù)組中的值就像當(dāng)于界面上的一個功能,你可以強行把每組值試出來代表什么。:p
到此安裝fckeditor就完成了,相關(guān)詳細(xì)配置你可以看fckeditor-2.3.zip,(jsp,fckeditor整合包)文件夾中web/_samples目錄下的例子。
新聞熱點
疑難解答