ckeditor添加插件 添加功能

1、批量去除超链接:打开 statics/js/ckeditor/ckeditor.js找到:$.execCommand(&unlink&,false,null);
修改为:$.execCommand(&unlink&,false,true);
2、上传图片自动添加ALT参数修改 statics/js/ckeditor/plugins/image/dialogs/image.js找到:accessKey:&T&,&default&:&
替换成:accessKey:&T&,&default&:$(&#title&).val()热烈庆祝我爱大冶网开通,欢迎访问!3、修改编辑器回车换行
打开文件 \statics\js\ckeditor\config.js 把里面的:
config.enterMode = CKEDITOR.ENTER_BR;config.shiftEnterMode = CKEDITOR.ENTER_P;
修改为:config.enterMode = CKEDITOR.ENTER_P;config.shiftEnterMode = CKEDITOR.ENTER_BR;
4、给编辑器添加一键排版功能修改phpcms\libs\classes栏目下的 form.class.php 找到['Maximize'],在它下面添加['autoformat'],保存即可。找到statics\js\ckeditor文件夹下的 config.js 文件,找到:config.extraPlugins = &capture&;
修改为:config.extraPlugins = &capture,autoformat&;保存即可,修改后记得更新缓存,清除cookies。
其实上面的内容主要就是给ckeditor编辑器添加一键排版功能的方法。有需要的朋友可以试下哦~非常实用的哈!
热烈庆祝新站开通,欢迎访问!
阅读(...) 评论()为ckeditor添加行距的功能
发现CKeditor没有设置行距的功能,想想这么重要的功能肯定有相应的插件,于是百度一下,倒是有不少的教程,所以记录一下,以备后用,
1.下载ckeditor的行距插件包
2.解压到ckeditor/plugins目录下
3.修改ckeditor目录下的 config.js文件,在其中添加以下的代码
config.extraPlugins += (config.extraPlugins ? ',lineheight' : 'lineheight');
CKEDITOR.config.toolbar_Full =
{ name: 'document',
items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
{ name: 'clipboard',
items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing',
items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
{ name: 'forms',
items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
{ name: 'basicstyles',
items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph',
items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
{ name: 'links',
items : [ 'Link','Unlink','Anchor' ] },
{ name: 'insert',
items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
{ name: 'styles',
items : [ 'Styles','Format','Font','FontSize','lineheight' ] },
{ name: 'colors',
items : [ 'TextColor','BGColor' ] },
{ name: 'tools',
items : [ 'Maximize', 'ShowBlocks','-','About' ] }
4.现在就ok了,行距功能就有了。
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。为CKEditor添加Readonly按钮和Upload Image按钮 |你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
按照CK官网方式给3.1的编辑器添加一些插件,但是不起作用,能介绍下添加方法吗?另外编辑器需要源码模式和undo,redo,我编辑了一篇文章,然后不小心点了code按钮,说什么也取消不了了,清除格式什么的一概不管用,只有放弃重发,这就太麻烦了,所以上边的功能还是必须的
再补充一点,就是对齐方式也需要,图片文字现在无法居中、左、右对齐,呵呵,希望春节前能给我们一个惊喜啊
稍安勿躁啊,我们在改。
3.1好多bug
最好官方能弄个添加插件教程,3.1测试版确实BUG多
该问题目前已经被锁定, 无法添加新回复
希望WC能像WP一样给力
关注: 4 人1716人阅读
Web实用功能(14)
为ckeditor编辑器添加行距功能,添加之后的效果如下:
具体做法是添加插件:在目录“\ckeditor\plugins”下添加插件目录“lineheight”,目录“\ckeditor\plugins\lineheight”下的文件截图如下:
然后需要对\ckeditor\config.js文件进行修改,即添加行距插件:
&config.extraPlugins += (config.extraPlugins ? ',lineheight' : 'lineheight');
不要忘记“config.toolbar_Full = 。。。”ckeditor的工具栏也要添加哦
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:281028次
积分:3750
积分:3750
排名:第5391名
原创:106篇
转载:51篇
评论:34条
(11)(7)(1)(13)(18)(4)(10)(1)(6)(22)(5)(15)(4)(3)(18)(14)(6)

我要回帖

更多关于 ckeditor 添加超链接 的文章

 

随机推荐