]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/config.js
Updated npm package versions
[bookstack] / resources / js / wysiwyg / config.js
index 148a4125b52226aed146aeb570e35bbe3ebe4015..acf5e1d52530c9b8478e4eeb10455a7b664d08fa 100644 (file)
@@ -3,6 +3,7 @@ import {listen as listenForCommonEvents} from "./common-events";
 import {scrollToQueryString} from "./scrolling";
 import {listenForDragAndPaste} from "./drop-paste-handling";
 import {getPrimaryToolbar, registerAdditionalToolbars} from "./toolbars";
+import {registerCustomIcons} from "./icons";
 
 import {getPlugin as getCodeeditorPlugin} from "./plugin-codeeditor";
 import {getPlugin as getDrawioPlugin} from "./plugin-drawio";
@@ -166,13 +167,13 @@ function getSetupCallback(options) {
     return function(editor) {
         editor.on('ExecCommand change input NodeChange ObjectResized', editorChange);
         listenForCommonEvents(editor);
-        registerShortcuts(editor);
         listenForDragAndPaste(editor, options);
 
         editor.on('init', () => {
             editorChange();
             scrollToQueryString(editor);
             window.editor = editor;
+            registerShortcuts(editor);
         });
 
         editor.on('PreInit', () => {
@@ -255,7 +256,7 @@ export function build(options) {
         statusbar: false,
         menubar: false,
         paste_data_images: false,
-        extended_valid_elements: 'pre[*],svg[*],div[drawio-diagram],details[*],summary[*],div[*],li[class|checked]',
+        extended_valid_elements: 'pre[*],svg[*],div[drawio-diagram],details[*],summary[*],div[*],li[class|checked|style]',
         automatic_uploads: false,
         custom_elements: 'doc-root,code-block',
         valid_children: [
@@ -291,6 +292,7 @@ export function build(options) {
             head.innerHTML += fetchCustomHeadContent();
         },
         setup(editor) {
+            registerCustomIcons(editor);
             registerAdditionalToolbars(editor, options);
             getSetupCallback(options)(editor);
         },