]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/page-display.js
Comments: Added HTML filter on load, tinymce elem filtering
[bookstack] / resources / js / components / page-display.js
index bd1986c6ca8a37ef2337d64b00ec1a967401b29f..1e13ae38800ebf6cd86a588cbe7e07ccc0957200 100644 (file)
@@ -37,7 +37,6 @@ export class PageDisplay extends Component {
 
         window.importVersioned('code').then(Code => Code.highlight());
         this.setupNavHighlighting();
-        this.setupDetailsCodeBlockRefresh();
 
         // Check the hash on load
         if (window.location.hash) {
@@ -87,14 +86,4 @@ export class PageDisplay extends Component {
         }
     }
 
-    setupDetailsCodeBlockRefresh() {
-        const onToggle = event => {
-            const codeMirrors = [...event.target.querySelectorAll('.CodeMirror')];
-            codeMirrors.forEach(cm => cm.CodeMirror && cm.CodeMirror.refresh());
-        };
-
-        const details = [...this.container.querySelectorAll('details')];
-        details.forEach(detail => detail.addEventListener('toggle', onToggle));
-    }
-
 }