本文共 698 字,大约阅读时间需要 2 分钟。
## 解压Kindeditor的压缩包
## 前段页面(内嵌name为content的标签即可)
## js代码
var editor;KindEditor.ready(function(K) { editor = K.create('textarea[name="content"]', { newlineTag : "br", resizeType : 2, allowPreviewEmoticons : true, allowImageUpload : true, minHeight:"100px", autoHeightMode : false, afterCreate : function() { this.loadPlugin('autoheight'); }, items : [ 'fullscreen', 'source' , 'table', 'insertfile', 'link' , 'image' , 'emoticons' , '|' , 'forecolor', 'hilitecolor', 'bold' ,'underline', 'removeformat', '|' , 'justifyleft', 'justifycenter', 'justifyright', 'preview'] });});## 获取输入框的内容
var data = editor.html();data = encodeURIComponent(data);
转载地址:http://wbvbi.baihongyu.com/