• 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>

  • 相关阅读:
    java 运算
    java String
    java的数据类型
    Python: str() 和 repr() 的区别
    Linux命令:which
    Linux命令:locate
    Linux命令:ifconfig
    Linux命令:whereis
    Linux命令:rz 和 sz
    Linux命令:scp
  • 原文地址:https://www.cnblogs.com/baie/p/2588770.html
Copyright © 2020-2023  润新知