【前端】CKeditor屏蔽“浏览服务器”功能

来源:互联网 发布:bugfree3.0.4 linux 编辑:程序博客网 时间:2024/06/05 16:01
CKEditor+CKFinder屏蔽“浏览服务器”按钮

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

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

 ,style:'display:none;'

修改“图像属性”中"图像"的浏览服务器

[javascript] view plaincopyprint?
  1. {type:'button',id:'browse',style:'display:inline-block;margin-top:10px;',align:'center',label:q.lang.common.browseServer,hidden:true,filebrowser:'info:txtUrl'}  


[javascript] view plaincopyprint?
  1. {type:'button',id:'browse',style:'display:none;margin-top:10px;',align:'center',label:q.lang.common.browseServer,hidden:true,filebrowser:'info:txtUrl'}  

修改“图像属性”中“超链接”的浏览服务器

[javascript] view plaincopyprint?
  1. {type:'button',id:'browse',filebrowser:{action:'Browse',target:'Link:txtUrl',url:q.config.filebrowserImageBrowseLinkUrl||q.config.filebrowserBrowseUrl},style:'float:right',hidden:true,label:q.lang.common.browseServer}  

[javascript] view plaincopyprint?
  1. {type:'button',id:'browse',filebrowser:{action:'Browse',target:'Link:txtUrl',url:q.config.filebrowserImageBrowseLinkUrl||q.config.filebrowserBrowseUrl},style:'float:right;display:none;',hidden:true,label:q.lang.common.browseServer}  

2、去除上传文件功能中的浏览服务器按钮

打开ckeditor\plugins\link\dialogs\link.js文件,同样搜索browseServer,找到出现的位置,在后面添加,style:'display:none;'。

修改

[javascript] view plaincopyprint?
  1. {type:'button',id:'browse',hidden:'true',filebrowser:'info:url',label:a.lang.common.browseServer}  

[javascript] view plaincopyprint?
  1. {type:'button',id:'browse',hidden:'true',filebrowser:'info:url',label:a.lang.common.browseServer, style:"display:none;"}  

3、去除上传flash功能中的浏览服务器按钮

打开ckeditor\plugins\flash\dialogs\flash.js文件,同样搜索browseServer,找到出现的位置,在后面添加,style:'display:none;'。


0 0