jquerytwitter-bootstrap-3richtextboxrich-text-editorsummernote

Summernote Rich-text editor: minHeight and maxHeight options have no effect


I am using Summernote as a rich-text editor, however the minHeight and maxHeight initialization options have seemingly no effect? (It works fine with the height option.)

I searched for other posts but couldn't find one with exactly the same problem. Here is my code:

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
    });
});

I am using the latest version of Summernote, and it runs ok in other respects while using jQuery 1.11.1, Bootstrap 3.0.1, and font awesome 4.0.3. Tested in Chrome and IE10 browsers.

If anybody knows a fix for this issue, please let me know.


Solution

  • I think there is a small bug, I needed to modify the core library to get this working. See the code below where I added the else if

    if (options.height) {
        $editable.height(options.height);
    } else if(options.maxHeight){ 
        $editable.css('max-height', options.maxHeight);
    }