2
0
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:
Jeroen Akkerman 2020-08-15 20:19:19 +02:00 committed by GitHub
commit 4796a2f5b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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