它不需要安裝任何形式的客戶端,兼容絕大多數(shù)主流瀏覽器,支持ASP.Net、ASP、ColdFusion 、PHP、Jsp、Active-FoxPro、Lasso、Perl、ython 等編程環(huán)境。
官方網(wǎng)站 http://www.fckeditor.net/
官方文檔 http://wiki.fckeditor.net/
下載地址 http://www.fckeditor.net/download/default.html
FCKeditor安裝和配置
下載FCKeditor2.63.zip和FCKeditor.NET2.63版的2個(gè)zip包
(a) FCKeditor_2.6.3是html文件、Javascript文件和圖片等資源文件
(b) FCKeditor.Net_2.6.3.zip是一個(gè)ASP.NET控件DLL文件
Asp.Net項(xiàng)目中添加對(duì) FCKeditor 的引用
1. 項(xiàng)目上選擇添加引用找到FredCK.FCKeditorV2.dll或直接將FredCK.FCKeditorV2.dll復(fù)制到項(xiàng)目的Bin目錄中
2. 為了方便開發(fā),可以把FredCK.FCKeditorV2.dll控件也添加到VS的工具箱中
3. 配置Web.Config,在<appSettings>節(jié)點(diǎn)添加,如下所示:
<appSettings>
<!--FCKeditor文本編輯控件配置-->
<add key="FCKeditor.BasePath" value="~/FCKeditor/"/>
<add key="FCKeditor.UserFilesPath" value="/解決方案名/uploads"/> //UserFilesPath的文路徑可以在FCKeditor/editor/filemanager/connectors/aspx/config.ascx中更改
</appSettings>
4.網(wǎng)頁(yè)中使用
<FCKeditorV2:FCKeditor ID="FCKeditor" runat="server" BasePath="~/FCKeditor/">//BasePath指定到FCKeditor的根目錄</FCKeditorV2:FCKeditor>
FCKeditor 的配置:
進(jìn)入FCKeditor文件夾,編輯 fckconfig.js 文件
1、修改(改成自己當(dāng)前使用的語(yǔ)言)
var _FileBrowserLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
2、修改配置語(yǔ)言
FCKConfig.DefaultLanguage = ‘en' 為: FCKConfig.DefaultLanguage = ‘zh-CN' ;
3、配置皮膚,有default、office2003、silver風(fēng)格等。
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
4、在編輯器域內(nèi)可以使用Tab鍵。(1為是,0為否)
FCKConfig.TabSpaces = 0 ; 改為 FCKConfig.TabSpaces = 1 ;
5、加上幾種常用的字體:
FCKConfig.FontNames = ‘宋體;黑體;隸書;楷體_GB2312;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana';
6、編輯器域內(nèi)默認(rèn)的顯示字體為12px,想要修改可以通過修改樣式表來達(dá)到要求,打開/editor/css/fck_editorarea.css,修改font-size屬性即可
7、關(guān)于安全性
如果你的編輯器用在前臺(tái)非認(rèn)證的情況下,推薦使用Basic的toolbar
FCKConfig.ToolbarSets["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','Image','-','About']
] ;
8、在上傳文件窗口點(diǎn)擊瀏覽服務(wù)器,可能會(huì)出現(xiàn) the server didn't send back a proper xml….. 錯(cuò)誤提示,是因?yàn)镕CKeditor要求不同類型的文件分別傳到不同的目錄,包括file,image,falsh,media 等目錄,可以先建立起來試試。
FCKEditor.NET 2.6 的安全性配置
文件上傳,出錯(cuò):(This connector is disabled.please check the "editor/filemanager/connectors/aspx/config.ascx" file.)
打開 editor/filemanager/connectors/aspx/config.ascx 文件,返回true.
新聞熱點(diǎn)
疑難解答