mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
CM6: Got WYSIWYG code blocks working
Required monkey-patch to work around potential codemirror issue with shadowdom+iframe usage. Also updated JS packages to latest versions.
This commit is contained in:
@ -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);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user