1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

Split out codemirror JS to its own module

Added a cache-compatible module loading system/pattern to the codebase.
This commit is contained in:
Dan Brown
2022-02-08 11:10:01 +00:00
parent 130dc05517
commit a2bcf765a8
10 changed files with 73 additions and 56 deletions

View File

@ -1,5 +1,4 @@
import Clipboard from "clipboard/dist/clipboard.min";
import Code from "../services/code";
import * as DOM from "../services/dom";
import {scrollAndHighlightElement} from "../services/util";
@ -9,7 +8,7 @@ class PageDisplay {
this.elem = elem;
this.pageId = elem.getAttribute('page-display');
Code.highlight();
window.importVersioned('code').then(Code => Code.highlight());
this.setupPointer();
this.setupNavHighlighting();
this.setupDetailsCodeBlockRefresh();