gpt4 book ai didi

jquery - Summernote富文本编辑器: minHeight and maxHeight options have no effect

转载 作者:行者123 更新时间:2023-12-01 03:12:21 25 4
gpt4 key购买 nike

我正在使用Summernote作为富文本编辑器,但是 minHeightmaxHeight 初始化选项似乎没有效果? (它可以与 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.1Bootstrap 3.0.1 时,它在其他方面运行正常> 和 font Awesome 4.0.3。在 ChromeIE10 浏览器中进行了测试。

如果有人知道此问题的解决方法,请告诉我。

最佳答案

我认为有一个小错误,我需要修改核心库才能使其正常工作。请参阅下面的代码,我在其中添加了 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com