2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-05 09:04:28 -06:00

Deal with minHeight option

This commit is contained in:
Nick Denry 2020-05-29 03:15:56 +03:00
parent a61c7198a3
commit 1fd1ee2a97
2 changed files with 5 additions and 1 deletions

View File

@ -256,7 +256,6 @@
.editor-preview-active-side--no-fullscreen {
height: auto;
position: static;
min-height: calc(300px + 22px);
float: right;
}

View File

@ -2257,6 +2257,11 @@ EasyMDE.prototype.createSideBySide = function () {
if (!preview || !/editor-preview-side/.test(preview.className)) {
preview = document.createElement('div');
preview.className = 'editor-preview-side';
var optionsMinHeight = parseInt(this.options.minHeight);
var paddingTop = parseInt(window.getComputedStyle(wrapper).paddingTop);
var borderTopWidth = parseInt(window.getComputedStyle(wrapper).borderTopWidth);
var minHeight = optionsMinHeight + paddingTop * 2 + borderTopWidth * 2;
preview.style.minHeight = minHeight.toString() + 'px';
if (this.options.previewClass) {