zoukankan      html  css  js  c++  java
  • KindEditor文字自适应高度

      <script>
                var editor;
                KindEditor.ready(function(K) {
                    editor = K.create('textarea[name="content"]', {
                        resizeType : 1,
                        allowPreviewEmoticons : false,
                        allowImageUpload : false,
                        items : ['emoticons', 'image', 'link'],
                        afterChange : function () {  //输入文字事件
                            var autoheight = K.IE ? this.edit.doc.body.scrollHeight : this.edit.doc.body.offsetHeight;  //判断是否是IE,并获取内容高度。
                             this.edit.setHeight(autoheight);   //设置高度
                        }
                    });
                });
      </script>

  • 相关阅读:
    xiaota-banzhuren-login.vue-重置密码
    xiaota-banzhuren-login.vue
    xiaota-global-index
    xiaota-router-index
    tab表格嵌套tab表格
    xiaota-selectarr
    xiaota-getlunardate
    xiaota-format
    xitaota-DataTime
    xiaota-axioslmport
  • 原文地址:https://www.cnblogs.com/baie/p/2588770.html
Copyright © 2011-2022 走看看