Ckfinder+2.1+Ckeditor+3.6.2+配置详解(.NET)

今天要用到编辑器,看到网上好多人都说CKEDITOR好用,所以在网上下了最新的版本 Ckeditor 3.6.2。怎么配置它我的博客里面有,这里给一个链接好了,不详述了
http://blog.csdn.net/gzas1989/article/details/6845785
然后我有需要用到图片上传功能,晚上说要Ckfinder的配合,所以果断插入~我下的版本是Ckfinder 2.1。问题就来了~怎么配置呢~默认是没有上传按钮的啊~朋友有建议自己做上传功能绕过Ckfinder 的~自己还是想研究一下~
方法如下,请需要的朋友跟上~(部分内容转载):
首先把Ckfinder 和Ckeditor都解压到同一个文件夹,然后神马引用到Bin文件夹之类的我就不说了,网上有,和Ckeditor的一样


ckeditor里面的config.js 配置


CKEDITOR.editorConfig = function( config )
{
     config.language = 'zh-cn';//设置中文语言
     config.uiColor = '#AADC6E';//编辑器颜色
     config.font_names = '宋体;楷体_GB2312;新宋体;黑体;隶书;幼圆;微软雅黑;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana';
    config.toolbar_Full =
    [
        ['Source','-','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','CreateDiv'],
        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
        ['Link','Unlink','Anchor'],
          ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
        '/',
        ['Styles','Format','Font','FontSize'],
        ['TextColor','BGColor'],
        ['Maximize', 'ShowBlocks','-','About']
    ];
    config.toolbar_Basic =
    [
        ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About']
    ];
 
    config.width =700;
    config.height = 300;
  
};



ckfinder 里面的config.ascx的配置:
 

public override bool CheckAuthentication()
{
    
    // 窗体验证时用
       return Request.IsAuthenticated;
    //reture true; 不推荐使用

}






使用的时候直接拖放一个CKEditorControl,同时引用<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>//视个人修改啊!因为我是直接放CKEditorControl,没有用替换的方法,所以没有引用ckfinder.js。最后还有一个问题,就是点浏览或者上传功能的时候路径出错
比如我的根目录是http://localhost:1234/root/index.aspx
则应该打开的是http://localhost:1234/root/ckfinder/ckfinder.html
但是每次打开的都是http://localhost:1234/ckfinder/ckfinder.html
晚上办法五花八门,而且复杂


其实很简单,打开ckeditor下的config.js


config.filebrowserBrowseUrl = './ckfinder/ckfinder.html'; //上传文件时浏览服务文件夹
    config.filebrowserImageBrowseUrl = './ckfinder/ckfinder.html?Type=Images'; //上传图片时浏览服务文件夹
    config.filebrowserFlashBrowseUrl = './ckfinder/ckfinder.html?Type=Flash';  //上传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'; //上传Flash按钮(标签)




和原来的不同在于我在目录最前面加了一个.
问题解决~
最后还有一个DOME水印问题,这个好像不影响使用,而且是八进制和十六进制的代码~网上说全部改成\x20,没有尝试,事儿还多得很~有时间再说吧,祝大家用的愉快!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值