X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/63d62722825b9ba77f75db531363d29f9dcc6c68..refs/pull/4815/head:/resources/js/markdown/editor.js diff --git a/resources/js/markdown/editor.js b/resources/js/markdown/editor.js index decebe5f4..46c35c850 100644 --- a/resources/js/markdown/editor.js +++ b/resources/js/markdown/editor.js @@ -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} */ 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} 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 + */