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

标签 jquery twitter-bootstrap-3 richtextbox rich-text-editor summernote

我正在使用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/

相关文章:

html - 在 Bootstrap 3 中,如何更改垂直行之间的距离?

c# - 如何获取用户在 RichTextBox 中编写的文本的 TextRange

c# - 巨大的字符串到 WinForm RichTextBox

c# - 从 RichTextBox 复制选定的文本

javascript - Highcharts X 轴对齐

javascript - 如何让 div 在窗口调整大小时更改最大高度?

jquery - 无法使用 jquery 将脚本添加到 head

javascript - 仅在一个点拆分字符串

html - Bootstrap 中的隐藏行有一个高度

javascript - 单击外部 Via knockout 绑定(bind)处理程序,从 bootstrap 3.3.6 关闭 knockout Popover