ASP.NET使用FCKeditor編輯器

來源:互聯網
上載者:User

 

FCKeditor官網

http://www.fckeditor.net/

1:COPY fckeditor檔案夾到WEB項目下、項目添加DLL引用、建立UploadFiles檔案(上傳圖片等的目錄)

2:web.config配置

   <appSettings>

           <add key="FCKeditor:BasePath" value="~/fckeditor/"/>

           <add key="FCKeditor:UserFilesPath" value="~/UploadFiles/"/>

</appSettings>

<system.web>

           <pages validateRequest="false"/> --允許html代碼

</system.web>

3:必須更改的設定

編輯fckeditor根目錄下的fckconfig.js檔案(紅色字型表示更改後)

var _FileBrowserLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'aspx' ; // asp | aspx | cfm | lasso | php

FCKConfig.DefaultLanguage = 'zh-cn' ;

到這裡能夠正常使用fck編輯器了。

(4,5點非必須)

4:fckeditor根目錄下只保留editor檔案夾,和fckconfig.js、fckeditor.js、fckstyles.xml、fcktemplates.xml 4個檔案。

_開頭的是些樣本,可以刪除掉

5: 在fckconfig.js檔案尋找到FCKConfig.ToolbarSets["Default"] 可以對著預設工具列明白裡面的代碼意思。根據自己需求進行精簡,看起來不那麼臃腫。

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.