我正在使用Summernote作为富文本编辑器,但是 minHeight
和 maxHeight
初始化选项似乎没有效果? (它可以与 height
选项配合使用。)
我搜索了其他帖子,但找不到具有完全相同问题的帖子。这是我的代码:
HTML:
<textarea id='summernote_editor' name='summernote_editor' class='summernote'></textarea>
jQUEry:
$(function() {
$('.summernote').summernote( {
minHeight: 200 // using maxHeight here instead, or both, has no effect either
});
});
我使用的是最新版本的 Summernote
,在使用 jQuery 1.11.1
、Bootstrap 3.0.1
时,它在其他方面运行正常> 和 font Awesome 4.0.3
。在 Chrome
和 IE10
浏览器中进行了测试。
如果有人知道此问题的解决方法,请告诉我。
最佳答案
我认为有一个小错误,我需要修改核心库才能使其正常工作。请参阅下面的代码,我在其中添加了 else if
if (options.height) {
$editable.height(options.height);
} else if(options.maxHeight){
$editable.css('max-height', options.maxHeight);
}
关于jquery - Summernote富文本编辑器: minHeight and maxHeight options have no effect,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25159697/