-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.
* @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);
return editor;
}
-
/**
* @typedef MarkdownEditorConfig
* @property {String} pageId
* @property {Element} displayEl
* @property {HTMLTextAreaElement} inputEl
* @property {String} drawioUrl
+ * @property {HTMLInputElement[]} settingInputs
* @property {Object<String, String>} text
*/
* @property {Display} display
* @property {Markdown} markdown
* @property {Actions} actions
- * @property {CodeMirror} cm
- */
\ No newline at end of file
+ * @property {EditorView} cm
+ * @property {Settings} settings
+ */