]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/plugin-codeeditor.js
CM6: Got WYSIWYG code blocks working
[bookstack] / resources / js / wysiwyg / plugin-codeeditor.js
index cd0078b1d914da39ccdf3df993527f44f7ce4626..7eff5c279d4b28647856b570e9fcefb0b2ed4ed2 100644 (file)
@@ -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);
             };