mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-05 17:14:27 -06:00
Deal with minHeight option
This commit is contained in:
parent
a61c7198a3
commit
1fd1ee2a97
@ -256,7 +256,6 @@
|
|||||||
.editor-preview-active-side--no-fullscreen {
|
.editor-preview-active-side--no-fullscreen {
|
||||||
height: auto;
|
height: auto;
|
||||||
position: static;
|
position: static;
|
||||||
min-height: calc(300px + 22px);
|
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2257,6 +2257,11 @@ EasyMDE.prototype.createSideBySide = function () {
|
|||||||
if (!preview || !/editor-preview-side/.test(preview.className)) {
|
if (!preview || !/editor-preview-side/.test(preview.className)) {
|
||||||
preview = document.createElement('div');
|
preview = document.createElement('div');
|
||||||
preview.className = 'editor-preview-side';
|
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) {
|
if (this.options.previewClass) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user