CKeditor

大名鼎鼎的FCKeditor在2009年发布的新版本,与增加版本号不同,那次完全把它改名了,更名为CKeditor。这 应该是和它的开发公司CKSource的名字有关吧,该公司的另一个产品为CKFinder(一个Ajax文件管理器),这次可能为了保持一致,将FCK 更改为CK,但是版本号继承了下来,为CKeditor3.0版,同时,神飞发现,FCKeditor.net域名也已经转向至ckeditor.com了。据官方的解释,CK是对FCK的代码的完全重写,而且此项工作从2007年就开始了,并在今年初发表了多个测试版。至此,为大家服务长达6年的FCKeditor将被CKeditor替代。

FCKeditor的功能和用途相信大家都比较清楚,很多人都在自己的项目中采用FCK,所以具体的特性这里就不多介绍了,感兴趣的可以去官方了解详细的特性

 

CKEditor 的详细介绍:请点这里
CKEditor 的下载地址:请点这里
想通过手机客户端访问开源中国:请点这里

配置文件:

  1. 加载主配置文件config.js。
  2. 加载自定义的配置文件(如果有),覆盖相同的配置项。
  3. 使用对实例的配置覆盖相同的的配置项(只对当前实例有效)

修改:“回车”和“shift+回车”的换行行为

Config.Entermode = ’br’ ;

Config.ShiftEnterMod = ‘p’ ;

修改编辑区样式文件

Config.EditorAreaCSS = Config.BasePath + ’CSS的路径’ ;// Config.BasePath是ckeditor的文件夹

配置表情图片

smiley_images 表情图片

config.SmileyWindowHeight = ‘220’  表情图片的高

config.SmileyWindowWidth = ‘220’  表情图片的宽

config.SmileyColumns=’8’  设置每行8个表情

dialog.SetAutoSize(false)  设置窗口是否自控调整宽度

overflow:auto           设置显示效果为自动显示(超出则带滚动条)

 

去掉图像属性预览中的文字:找到image.js文件,找到里面的图像属性中的文字,删除掉

修改编辑区样式:找到config.BasePath ,修改

CKeditor屏蔽“浏览服务器”功能

CKEditor+CKFinder屏蔽“浏览服务器”按钮

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

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

 ,style:'display:none;'

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

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


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


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

  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}  


  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;'。

修改

  1. {type:'button',id:'browse',hidden:'true',filebrowser:'info:url',label:a.lang.common.browseServer}  


  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;'。

 

posted on 2013-01-03 15:07  为学日损  阅读(722)  评论(0编辑  收藏  举报

导航