ASP.NET CKEditor和CKFinder配置
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了ASP.NET CKEditor和CKFinder配置,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2419字,纯文字阅读大概需要4分钟。
内容图文
第一次搞这个真的搞的头大,好歹最后也学会了。下面分享一下步骤
第一步:
官网下载CKEditor最新的和CKFinder最新的 都是Net版本的
第二步:
解压2个复制文件到网站下面,最好平级
第三步,记得引用下ckfinder 下面的dll
第四步:
配置ckEdit的工具条
在ckedit 下面的config.js 里面 我的是简单的工具栏
config.language = ‘zh-cn‘;
config.uiColor = ‘#DBEEF5‘;
config.toolbar = ‘Full‘;
config.height = 400;
config.resize_enabled = false;
config.toolbar_Full = [
[‘Bold‘, ‘Italic‘, ‘Underline‘, ‘Strike‘, ‘-‘, ‘Subscript‘, ‘Superscript‘],
[‘NumberedList‘, ‘BulletedList‘, ‘-‘, ‘Outdent‘, ‘Indent‘],
[‘JustifyLeft‘, ‘JustifyCenter‘, ‘JustifyRight‘, ‘JustifyBlock‘],
[‘Format‘, ‘FontSize‘],
[‘TextColor‘, ‘BGColor‘],
[‘Image‘]
];
对应图片
下面这是所有的工具栏配置自己选
config.toolbar_Full = [
[‘Source‘,‘-‘,‘Save‘,‘NewPage‘,‘Preview‘,‘-‘,‘Templates‘],
[‘Cut‘,‘Copy‘,‘Paste‘,‘PasteText‘,‘PasteFromWord‘,‘-‘,‘Print‘, ‘SpellChecker‘, ‘Scayt‘],
[‘Undo‘,‘Redo‘,‘-‘,‘Find‘,‘Replace‘,‘-‘,‘SelectAll‘,‘RemoveFormat‘],
[‘Form‘, ‘Checkbox‘, ‘Radio‘, ‘TextField‘, ‘Textarea‘, ‘Select‘, ‘Button‘, ‘ImageButton‘, ‘HiddenField‘],
‘/‘,
[‘Bold‘,‘Italic‘,‘Underline‘,‘Strike‘,‘-‘,‘Subscript‘,‘Superscript‘],
[‘NumberedList‘,‘BulletedList‘,‘-‘,‘Outdent‘,‘Indent‘,‘Blockquote‘],
[‘JustifyLeft‘,‘JustifyCenter‘,‘JustifyRight‘,‘JustifyBlock‘],
[‘Link‘,‘Unlink‘,‘Anchor‘],
[‘Image‘,‘Flash‘,‘Table‘,‘HorizontalRule‘,‘Smiley‘,‘SpecialChar‘,‘PageBreak‘],
‘/‘,
[‘Styles‘,‘Format‘,‘Font‘,‘FontSize‘],
[‘TextColor‘,‘BGColor‘]
];
第五步与ckfinder集成
还是在ckeditr里面config里面配置
// 在 CKEditor 中集成 CKFinder,注意 ckfinder 的路径选择要正确。
config.filebrowserBrowseUrl = location.hash + ‘/admin/ckfinder/ckfinder.html‘;
config.filebrowserImageBrowseUrl = location.hash + ‘/admin/ckfinder/ckfinder.html?Type=Images‘;
config.filebrowserUploadUrl = location.hash + ‘/admin/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files‘;
config.filebrowserImageUploadUrl = location.hash + ‘/admin/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images‘;
config.filebrowserWindowWidth = ‘800‘;
config.filebrowserWindowHeight = ‘500‘;
然后配置ckfinder 在 里面找到config.ascx 把这个方法返回为true 允许上传
以及设置图片上传的路径
最后使用
引用2个js
<script src="ckeditor/ckeditor.js" type="text/javascript"></script>
<script src="ckfinder/ckfinder.js" type="text/javascript"></script>
控件上加class="ckeditor 就OK了
<asp:TextBox ID="tbContent" runat="server" TextMode="MultiLine" class="ckeditor"></asp:TextBox>
原文:http://blog.csdn.net/qq873113580/article/details/39317417
内容总结
以上是互联网集市为您收集整理的ASP.NET CKEditor和CKFinder配置全部内容,希望文章能够帮你解决ASP.NET CKEditor和CKFinder配置所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。