五月综合缴情婷婷六月,色94色欧美sute亚洲线路二,日韩制服国产精品一区,色噜噜一区二区三区,香港三级午夜理伦三级三

您現(xiàn)在的位置: 365建站網(wǎng) > 365文章 > FCKeditor 2.6在ASP.NET中的配置方法(附源碼下載)

FCKeditor 2.6在ASP.NET中的配置方法(附源碼下載)

文章來(lái)源:365jz.com     點(diǎn)擊數(shù):468    更新時(shí)間:2009-09-20 09:02   參與評(píng)論
FCKEditor目前的最新版本是2.6,但支持.NET的DLL版本還是2.5,本文介紹FCKEditor2.6在ASP.NET中的配置方法。

本文的示例下載地址(包含了整個(gè)解決方案及網(wǎng)站,下載后即可使用):
地址:http://www.china-aspx.com/Forum/showtopic-57.aspx

FCKEditor官方下載地址:http://www.fckeditor.net/download

配置方法如下:

一、在官方網(wǎng)站上下載

下載地址:http://sourceforge.net/project/downloading.php?group_id=75348&filename=FCKeditor_2.6.zip

解壓后目錄結(jié)構(gòu)如下圖所示:



二、刪除不必要的文件

從官方下載下來(lái)的FCKEditor2.6大小有3.61M(解壓后),其實(shí)有很多文件對(duì)于只用ASP.NET的來(lái)講是不需要的,我們可以刪除不必要的文件:

1.根目錄下除editor目錄、fckconfig.js、fckeditor.js  fckstyles.xml  fcktemplates.xml 這幾個(gè)保留,其余的全部刪除

2.editor\filemanager\connectors目錄中除aspx目錄外全部刪除

3.editor\lang目錄中除en.js、zh.js 、zh-cn.js外全部刪除

4.刪除_samples目錄,當(dāng)然如果你想看示例,就不要?jiǎng)h除這個(gè)目錄了。

三、FCKEditor2.6的詳細(xì)設(shè)置

1.fckconfig.js中修改

FCKConfig.ToolbarSets["Default"] = [
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['FitWindow','ShowBlocks','-','About']  // No comma for the last row.
] ;
//上面一段我去掉了一些不常用的功能,可以根據(jù)實(shí)際需要增加。
FCKConfig.DefaultLanguage  = 'zh-cn' ;    //原來(lái)是en
var _FileBrowserLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py  改成aspx
var _QuickUploadLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py

2.在Bin中加入DLL文件
DLL文件下載地址:http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=137125

3.在工具欄中加入DLL文件

4.配置上傳路徑
編輯FCKeditor\editor\filemanager\connectors\aspx\config.aspx 中修改

private bool CheckAuthentication()
{
  // WARNING : DO NOT simply return "true". By doing so, you are allowing
  // "anyone" to upload and list the files in your server. You must implement
  // some kind of session validation here. Even something very simple as...
  //
  //  return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );
  //
  // ... where Session[ "IsAuthorized" ] is set to "true" as soon as the
  // user logs in your system.
  return true; //原來(lái)這里是 false;不過(guò)還是建議看看上面的警告
}

在SetConfig方法中設(shè)置

UserFilesPath = "~/Upload/FCKEditor";//我這里設(shè)置在了網(wǎng)站根目錄下的Upload/FCKEditor目錄中,根據(jù)實(shí)際情況和個(gè)人喜好而定。

好了,大家有什么問(wèn)題可以去http://www.china-aspx.com/Forum提問(wèn),也可MSN:china-aspx@hotmail.com。

本文的示例下載地址(包含了整個(gè)解決方案及網(wǎng)站,下載后即可使用):
地址:http://www.china-aspx.com/Forum/showtopic-57.aspx
Tag標(biāo)簽: FCKEditor2.6,ASP.NET

如對(duì)本文有疑問(wèn),請(qǐng)?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會(huì)為你解答??! 點(diǎn)擊進(jìn)入論壇

發(fā)表評(píng)論 (468人查看0條評(píng)論)
請(qǐng)自覺(jué)遵守互聯(lián)網(wǎng)相關(guān)的政策法規(guī),嚴(yán)禁發(fā)布色情、暴力、反動(dòng)的言論。
昵稱:
最新評(píng)論
------分隔線----------------------------
大家感興趣的內(nèi)容
最近更新的內(nèi)容

其它欄目

· 建站教程
· 365學(xué)習(xí)

業(yè)務(wù)咨詢

· 技術(shù)支持
· 服務(wù)時(shí)間:9:00-18:00
365建站網(wǎng)二維碼

Powered by 365建站網(wǎng) RSS地圖 HTML地圖

copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號(hào)