2
0
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:
Nick Denry 2020-06-01 16:15:18 +03:00
parent f3b1090e53
commit d4cbe44fa4

View File

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