您的位置:首页 > 其它

基于DNN的CKeditor配置与使用

2013-10-16 19:42 323 查看
参考资料:http://blog.csdn.net/yanghongchang_/article/details/12582593

http://www.cnblogs.com/wuhuisheng/archive/2012/08/01/2617863.html

WEBCONFIG配置,不然会报错的 (标红的部分加上)

<httpRuntime executionTimeout="500" requestValidationMode="2.0"/>

<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"
 validateRequest="false" /></system.web>

ckeditor\plugins\image\dialogs\image.js里去掉一段话,就是选择图片上传的比较乱的一段话

这一段里的虚拟路径暂时没用到用到的时候再说吧

if (CKEDITOR.instances['Txb_ProductContent']) {

                    CKEDITOR.remove(CKEDITOR.instances['Txb_ProductContent']);

                } //如果实例已存在

                var editor = CKEDITOR.replace('Txb_ProductContent'); //实例化

//                editor.BasePath = "DesktopModules/YourCompany.Jz_Product/ckfinder/";

//                CKFinder.setupCKEditor(editor, "/ckfinder/"); //相对路径

现在用的是这个

CKEDITOR.replace('<%= Txb_ProductContent.ClientID %>',

                                {

                                    toolbar: 'Product',

                                    width: '700px',

                                    toolbarStartupExpanded: false

                                }

                                );

在网上有很多人都说在CKFinder中的config.ascx添加如下代码: 

public override bool CheckAuthentication()

    {

        return true;//这样配置所有人都可以用

        //return Request.IsAuthenticated;//这样配置只有管理员可以用

    }

去除上传图片功能中的浏览服务器按钮

打开ckeditor\plugins\image\dialogs\image.js文件,搜索browseServer,找到该词第一次出现的位置,在后面添加,style:'display:none;'。 

第二个browseServer位置是第二菜单:超链接的“浏览服务器”按钮,也可按上种办法去掉
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: