]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/config.js
Split out codemirror JS to its own module
[bookstack] / resources / js / wysiwyg / config.js
index 0b43b9c79bc306af492986732b972f2c4283b9a8..1a38c1f597591e72674d260fec06a93b4906cc3e 100644 (file)
@@ -1,6 +1,6 @@
 import {register as registerShortcuts} from "./shortcuts";
 import {listen as listenForCommonEvents} from "./common-events";
-import {scrollToQueryString, fixScrollForMobile} from "./scrolling";
+import {scrollToQueryString} from "./scrolling";
 import {listenForDragAndPaste} from "./drop-paste-handling";
 
 import {getPlugin as getCodeeditorPlugin} from "./plugin-codeeditor";
@@ -164,7 +164,6 @@ function getSetupCallback(options) {
         editor.on('init', () => {
             editorChange();
             scrollToQueryString(editor);
-            fixScrollForMobile(editor);
             window.editor = editor;
         });
 
@@ -238,14 +237,13 @@ export function build(options) {
         file_picker_types: 'file image',
         file_picker_callback,
         paste_preprocess(plugin, args) {
-            let content = args.content;
+            const content = args.content;
             if (content.indexOf('<img src="file://') !== -1) {
                 args.content = '';
             }
         },
         init_instance_callback(editor) {
-            let head = editor.getDoc().querySelector('head');
-            console.log(fetchCustomHeadContent());
+            const head = editor.getDoc().querySelector('head');
             head.innerHTML += fetchCustomHeadContent();
         },
         setup(editor) {