mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-03 08:04:29 -06:00
Fix maxHeight less than minHeight
This commit is contained in:
parent
754bdc3ab2
commit
32e0971483
@ -1718,9 +1718,14 @@ 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') {
|
||||||
|
options.minHeight = options.maxHeight; // Min and max height are equal if maxHeight is set
|
||||||
|
} else {
|
||||||
|
options.minHeight = options.minHeight || '300px';
|
||||||
|
}
|
||||||
|
|
||||||
options.errorCallback = options.errorCallback || function (errorMessage) {
|
options.errorCallback = options.errorCallback || function (errorMessage) {
|
||||||
alert(errorMessage);
|
alert(errorMessage);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user