]> BookStack Code Mirror - bookstack/blobdiff - resources/js/markdown/editor.js
Comments: Added HTML filter test, fixed placeholder in dark mode
[bookstack] / resources / js / markdown / editor.js
index decebe5f4a4fc2a0ed6e910b8bc52dbdc5c5578e..46c35c850ac77b5e19277c00df784f6a415546c4 100644 (file)
@@ -1,9 +1,9 @@
-import {Markdown} from "./markdown";
-import {Display} from "./display";
-import {Actions} from "./actions";
-import {listen} from "./common-events";
-import {init as initCodemirror} from "./codemirror";
-
+import {Markdown} from './markdown';
+import {Display} from './display';
+import {Actions} from './actions';
+import {Settings} from './settings';
+import {listen} from './common-events';
+import {init as initCodemirror} from './codemirror';
 
 /**
  * Initiate a new markdown editor instance.
@@ -11,13 +11,13 @@ import {init as initCodemirror} from "./codemirror";
  * @returns {Promise<MarkdownEditor>}
  */
 export async function init(config) {
-
     /**
      * @type {MarkdownEditor}
      */
     const editor = {
         config,
         markdown: new Markdown(),
+        settings: new Settings(config.settingInputs),
     };
 
     editor.actions = new Actions(editor);
@@ -29,7 +29,6 @@ export async function init(config) {
     return editor;
 }
 
-
 /**
  * @typedef MarkdownEditorConfig
  * @property {String} pageId
@@ -37,6 +36,7 @@ export async function init(config) {
  * @property {Element} displayEl
  * @property {HTMLTextAreaElement} inputEl
  * @property {String} drawioUrl
+ * @property {HTMLInputElement[]} settingInputs
  * @property {Object<String, String>} text
  */
 
@@ -46,5 +46,6 @@ export async function init(config) {
  * @property {Display} display
  * @property {Markdown} markdown
  * @property {Actions} actions
- * @property {CodeMirror} cm
- */
\ No newline at end of file
+ * @property {EditorView} cm
+ * @property {Settings} settings
+ */