]> BookStack Code Mirror - bookstack/blobdiff - resources/js/markdown/common-events.js
Readme: Swapped codeclimate reference for custom phpmetrics
[bookstack] / resources / js / markdown / common-events.js
diff --git a/resources/js/markdown/common-events.js b/resources/js/markdown/common-events.js
deleted file mode 100644 (file)
index 3afd03d..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-function getContentToInsert({html, markdown}) {
-    return markdown || html;
-}
-
-/**
- * @param {MarkdownEditor} editor
- */
-export function listen(editor) {
-
-    window.$events.listen('editor::replace', (eventContent) => {
-        const markdown = getContentToInsert(eventContent);
-        editor.actions.replaceContent(markdown);
-    });
-
-    window.$events.listen('editor::append', (eventContent) => {
-        const markdown = getContentToInsert(eventContent);
-        editor.actions.appendContent(markdown);
-    });
-
-    window.$events.listen('editor::prepend', (eventContent) => {
-        const markdown = getContentToInsert(eventContent);
-        editor.actions.prependContent(markdown);
-    });
-
-    window.$events.listen('editor::insert', (eventContent) => {
-        const markdown = getContentToInsert(eventContent);
-        editor.actions.insertContent(markdown);
-    });
-
-    window.$events.listen('editor::focus', () => {
-        editor.actions.focus();
-    });
-}
\ No newline at end of file