mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-02 15:44:28 -06:00
Merge pull request #222 from nick-denry/fix_maxHeight_less_than_minHeight
Fix max height less than min height
This commit is contained in:
commit
4796a2f5b6
@ -1718,9 +1718,15 @@ function EasyMDE(options) {
|
||||
// Merging the shortcuts, with the given options
|
||||
options.shortcuts = extend({}, shortcuts, options.shortcuts || {});
|
||||
|
||||
options.minHeight = options.minHeight || '300px';
|
||||
options.maxHeight = options.maxHeight || undefined;
|
||||
|
||||
if (typeof options.maxHeight !== 'undefined') {
|
||||
// Min and max height are equal if maxHeight is set
|
||||
options.minHeight = options.maxHeight;
|
||||
} else {
|
||||
options.minHeight = options.minHeight || '300px';
|
||||
}
|
||||
|
||||
options.errorCallback = options.errorCallback || function (errorMessage) {
|
||||
alert(errorMessage);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user