Home >php教程 >php手册 >KindEditor编辑器自适应高度

KindEditor编辑器自适应高度

WBOY
WBOYOriginal
2016-06-07 11:43:151514browse

KindEditor编辑器高度数值随着内容的增多而变大!
var editor;<br> KindEditor.ready(function(K) {<br> <br>     //progress<br>     editor = K.create('textarea[name="earnings"]', {<br>         resizeType : 1,<br>         allowPreviewEmoticons : false,<br>         allowImageUpload : false,<br>         items : [<br>             'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',<br>             'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',<br>             'insertunorderedlist', '|', 'emoticons', 'image', 'link'],<br>         resizeMode : 0<br>     });<br> <br>     var autoheight=editor.edit.doc.body.scrollHeight;<br>     editor.edit.setHeight(autoheight);<br> <br> });KindEditor编辑器自适应高度

AD:真正免费,域名+虚机+企业邮箱=0元

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn