mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-15 14:04:28 -06:00
Set preview height after element is added
This commit is contained in:
parent
f3b1090e53
commit
d4cbe44fa4
@ -2312,10 +2312,6 @@ EasyMDE.prototype.createSideBySide = function () {
|
||||
preview = document.createElement('div');
|
||||
preview.className = 'editor-preview-side';
|
||||
|
||||
if (this.options.maxHeight !== false) {
|
||||
this.setPreviewMaxHeight();
|
||||
}
|
||||
|
||||
if (this.options.previewClass) {
|
||||
|
||||
if (Array.isArray(this.options.previewClass)) {
|
||||
@ -2331,6 +2327,10 @@ EasyMDE.prototype.createSideBySide = function () {
|
||||
wrapper.parentNode.insertBefore(preview, wrapper.nextSibling);
|
||||
}
|
||||
|
||||
if (this.options.maxHeight !== false) {
|
||||
this.setPreviewMaxHeight();
|
||||
}
|
||||
|
||||
if (this.options.syncSideBySidePreviewScroll === false) return preview;
|
||||
// Syncs scroll editor -> preview
|
||||
var cScroll = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user