X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/74b4751a1c110b4c824b14369d3a5eea3ad5816a..09fd0bc5b79e93fa136afd7dac069f0bf1857cf3:/resources/js/wysiwyg/plugin-codeeditor.js diff --git a/resources/js/wysiwyg/plugin-codeeditor.js b/resources/js/wysiwyg/plugin-codeeditor.js index cd0078b1d..7eff5c279 100644 --- a/resources/js/wysiwyg/plugin-codeeditor.js +++ b/resources/js/wysiwyg/plugin-codeeditor.js @@ -110,8 +110,7 @@ function defineCodeBlockCustomElement(editor) { const container = this.shadowRoot.querySelector('.CodeMirrorContainer'); const renderCodeMirror = (Code) => { - this.cm = Code.wysiwygView(container, content, this.getLanguage()); - setTimeout(() => Code.updateLayout(this.cm), 10); + this.cm = Code.wysiwygView(container, this.shadowRoot, content, this.getLanguage()); setTimeout(() => this.style.height = null, 12); };