]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/plugin-codeeditor.js
CM6: Further fixes/improvements after testing
[bookstack] / resources / js / wysiwyg / plugin-codeeditor.js
index 9a7b3fe655c8d9fed4aa90ea24014b794f04d626..9e681486dadf96e7bcc154b561d630d48641d77f 100644 (file)
@@ -53,6 +53,7 @@ function defineCodeBlockCustomElement(editor) {
             cmContainer.style.pointerEvents = 'none';
             cmContainer.contentEditable = 'false';
             cmContainer.classList.add('CodeMirrorContainer');
+            cmContainer.classList.toggle('dark-mode', document.documentElement.classList.contains('dark-mode'));
 
             this.shadowRoot.append(...copiedStyles, cmContainer);
         }