Merge pull request #222 from nick-denry/fix_maxHeight_less_than_minHeight

Fix max height less than min height
pull/235/head
Jeroen Akkerman 4 years ago committed by GitHub
commit 4796a2f5b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1718,9 +1718,15 @@ function EasyMDE(options) {
// Merging the shortcuts, with the given options // Merging the shortcuts, with the given options
options.shortcuts = extend({}, shortcuts, options.shortcuts || {}); options.shortcuts = extend({}, shortcuts, options.shortcuts || {});
options.minHeight = options.minHeight || '300px';
options.maxHeight = options.maxHeight || undefined; 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) { options.errorCallback = options.errorCallback || function (errorMessage) {
alert(errorMessage); alert(errorMessage);
}; };

Loading…
Cancel
Save