FckEditor的安装与设置
生活随笔
收集整理的這篇文章主要介紹了
FckEditor的安装与设置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、在官方網站上下載
安裝前需求: 1.FCKeditor.Net_2.5.zip 下載地址: 2.FCKeditor_2.6.zip 下載地址:
二、刪除不必要的文件
從官方下載下來的FCKEditor2.6大小有3.61M(解壓后),其實有很多文件對于只用ASP.NET的來講是不需要的,我們可以刪除不必要的文件:
1.根目錄下除editor目錄、fckconfig.js、fckeditor.js?? fckstyles.xml?? fcktemplates.xml 這幾個保留,其余的全部刪除
2.editor\filemanager\connectors目錄中除aspx目錄外全部刪除
3.editor\lang目錄中除en.js、zh.js 、zh-cn.js外全部刪除
4.刪除_samples目錄,當然如果你想看示例,就不要刪除這個目錄了。
三、FCKEditor2.6的詳細設置
安裝過程: 1、將FCKeditor.Net_2.5.zip解壓縮。我們需要一個DLL文件。在\bin\realese\文件夾下有兩個版本。對應.netframework的版本,我的是.netframework2.0的,就在\bin\realese\2.0\下,(關于這里是選擇realese還是debug,要看需要,realese模式進行了代碼優化,更快,但沒有調試信息,debug模式則與其相反)拷貝FredCK.FCKeditorV2.dll至你的項目的bin目錄。然后在.net的工具箱中添加此項。 2、將FCKeditor_2.6.zip解壓縮。將所得的fckeditor文件夾拷貝至項目根目錄。
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.
] ;
//上面一段我去掉了一些不常用的功能,可以根據實際需要增加。
FCKConfig.DefaultLanguage?? = 'zh-cn' ; //原來是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文件下載地址:
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; //原來這里是 false;不過還是建議看看上面的警告
}
在SetConfig方法中設置
UserFilesPath = "~/Upload/FCKEditor";//我這里設置在了網站根目錄下的Upload/FCKEditor目錄中,根據實際情況和個人喜好而定。
轉載于:https://www.cnblogs.com/lichang1987/archive/2009/01/11/1373564.html
總結
以上是生活随笔為你收集整理的FckEditor的安装与设置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 孝敬父母 天经地义 |有人这么疑问?
- 下一篇: [Visual Stuido SDK]