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

相关文章:

  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
  • 2021-12-12
  • 2021-12-21
  • 2021-12-21
  • 2021-12-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-03
  • 2021-12-22
  • 2022-12-23
  • 2021-12-12
  • 2021-12-21
相关资源
相似解决方案