emlog5.1以上版本更新kindeditor编辑器版本的教程 [转]
时间:2014-6-14 19:54
浏览:12312
评论:0 条

emlog5.1以上版本更新kindeditor编辑器版本的教程
由于emlog5.1采用了新版本的kindeditor编辑器,所以对于以后自己想升级kindeditor的emlog用户来说也就没什么难度了,这里写这篇教程照着做就可以完美升级到新版本的。
1、先去官方下载最新版本的kindeditor,这个不用我说吧!kindeditor官方下载地址
2、下载完了当然是解压缩,适当的删减一些文件。
说一下要保留的文件和文件夹:
文件夹:lang、plugins和themes这3个
文件:kindeditor-min.js这1个
其他的东西还可以清除,虽然这些文件夹中还有一些可以删掉,但是这里我就不详细说明了,不删除也是可以的。
3、接下来就是修改了,把 kindeditor-min.js 改名为 kindeditor.js ,并修改kindeditor.js文件,在这个文件的最后加上以下代码:
window.editorMap = {}; function loadEditor(id){ $(function() { editorMap[id] = KindEditor.create('#'+id, { resizeMode:1, allowUpload:false, allowImageUpload:false, allowFlashUpload:false, allowPreviewEmoticons:false, urlType:'domain', items:['bold','italic','underline','strikethrough','forecolor','hilitecolor','fontname','fontsize','lineheight','removeformat','plainpaste','quickformat','insertorderedlist','insertunorderedlist','indent','outdent','justifyleft','justifycenter','justifyright','link','unlink','image','flash','table','emoticons','code','fullscreen','source','|','about'] }); }); }
4、用FTP把这些文件和文件夹替换emlog目录下的editor中文件。
附:如果需要使用全功能版本,请删除kindeditor.js中的以下代码(上面第3步中的):
, items:['bold','italic','underline','strikethrough','forecolor','hilitecolor','fontname','fontsize','lineheight','removeformat','plainpaste','quickformat','insertorderedlist','insertunorderedlist','indent','outdent','justifyleft','justifycenter','justifyright','link','unlink','image','flash','table','emoticons','code','fullscreen','source','|','about']
注意:前面那个,(逗号)也要删掉。
当然你想修改功能的多少可以修改items,具体的请看kindeditor官网。



本文没有标签!
本文作者:eehello
文章标题: emlog5.1以上版本更新kindeditor编辑器版本的教程 [转]
本文地址:https://www.xxnet.eu.org/?post=10
版权声明:若无注明,本文皆为“点滴记忆---观雨亭”原创,转载请保留文章出处。
本文地址:https://www.xxnet.eu.org/?post=10
版权声明:若无注明,本文皆为“点滴记忆---观雨亭”原创,转载请保留文章出处。

