ckeditor与ckfinder的使用方法 .NET (转载)
ckeditor 3.0.1學習筆記
?一.ckeditor 3.0.1精簡
? 精簡前:4.52M?? 精簡后:853K
? 1.刪除_samples和_source文件夾,分別為示例文件和未壓縮源程序
? 2.刪除lang文件夾下除zh-cn.js,en.js下的所有語言文件.根據需要刪除
? 3.刪除根目錄下的changes.html(更新列表),install.html(安裝指向),license.html(使用許可).
? 4.刪除skins目錄下不需要的皮膚.我一般用V2(簡單.樸素)? //如果只保留V2則必須在config.js中指定皮膚
二.ckeditor 3.0.1相關文件配置路徑
? 1./ckeditor.js?? 核心文件,調用需加載
? 2./config.js???? 配置文件,參數配置均在此完成
? 3./plugins/smiley/images 表情符號.
三.ckeditor應用(.net環境)
?? 1.引用js腳本
?? <script type="text/javascript" src="ckeditor/ckeditor.js"></script>
?? 2.將相應的控件替換成編輯器代碼
?? <asp:TextBox ID="TextBox1" runat="server" Rows="10" TextMode="MultiLine"></asp:TextBox>
?? <script type="text/javascript">CKEDITOR.replace('TextBox1')</script>
四.ckeditor配置(config.js配置文件)
?? 詳細api參數見:http://docs.cksource.com/ckeditor_api/,我的默認配置
?? CKEDITOR.editorConfig = function(config) {
config.language = "zh-cn";config.skin = "v2";
config.width = "80%";
config.height = "400px";
config.resize_enabled = false;
config.toolbar =
[
['Source', 'Preview', '-'],
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', ],
['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
['Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak'],
'/',
['Bold', 'Italic', 'Underline', '-', 'Subscript', 'Superscript'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Link', 'Unlink', 'Anchor'],
'/',
['Format', 'Font', 'FontSize'],
['TextColor', 'BGColor'],
['Maximize', 'ShowBlocks', '-', 'About']
];
ckfinder學習筆記
一.ckfinder精簡
?? 精簡前:1.10M? 精簡后:947K
?? 1.刪除_samples和_source文件夾,分別為示例文件和未壓縮源程序
?? 2.刪除根目錄下changelog.txt,install.txt,license.txt文件
?? 3.刪除core/lang目錄下除en.js,zh-cn.js的所有語言文件(根據條件刪除)
二.ckfinder配置
?? 1.復制/bin目錄下的ckfinder.dll文件至站點bin目錄
?? 2.復制ckfinder目錄至站點根目錄下(可另選擇路徑)
三.ckfinder應用
? 1.與ckeditor集成,詳情見官方文檔,官方文檔是加載修改,我用的方法是全局修改.
? 具體操作方法如下:修改ckeditor目錄下的config.js文件,添加:
? config.filebrowserBrowseUrl = '/ckfinder/ckfinder.html';
??? config.filebrowserImageBrowseUrl = '/ckfinder/ckfinder.html?Type=Images';
??? config.filebrowserFlashBrowseUrl = '/ckfinder/ckfinder.html?Type=Flash';
??? config.filebrowserUploadUrl = '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files';
??? config.filebrowserImageUploadUrl = '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images';
??? config.filebrowserFlashUploadUrl = '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash';
??? config.filebrowserWindowWidth = '800';
??? config.filebrowserWindowHeight = '500';
? 以上URL值需要根據你ckfinder路徑的不同而不同,
? 2.單獨應用
? 3.破解:
? 打開core/js下的兩個ckfinder_ie.js和ckfinder_gecko.js文件.查找字符串"en.call(window,qo);"將其注釋即可
?
另外一個配置的介紹:http://kb.cnblogs.com/a/1682702/
開發人員手冊:http://ckeditor.com.cn/docs/
官網:http://ckeditor.com/demo
轉載于:https://www.cnblogs.com/Godblessyou/archive/2010/07/20/1781042.html
總結
以上是生活随笔為你收集整理的ckeditor与ckfinder的使用方法 .NET (转载)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 市场上的几种手机
- 下一篇: 黄聪:Destoon中循环嵌套Loop和