diff --git a/package.json b/package.json index 2f3bc5e6..09487f42 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "echarts": "4.1.0", "element-ui": "2.4.6", "file-saver": "1.3.8", - "font-awesome": "4.7.0", "js-cookie": "2.2.0", "jsonlint": "1.6.3", "jszip": "3.1.5", @@ -52,8 +51,8 @@ "path-to-regexp": "2.4.0", "screenfull": "3.3.3", "showdown": "1.8.6", - "simplemde": "1.11.2", "sortablejs": "1.7.0", + "tui-editor": "1.2.7", "vue": "2.5.17", "vue-count-to": "1.0.13", "vue-i18n": "7.3.2", diff --git a/src/components/MarkdownEditor/defaultOptions.js b/src/components/MarkdownEditor/defaultOptions.js new file mode 100644 index 00000000..303aa13d --- /dev/null +++ b/src/components/MarkdownEditor/defaultOptions.js @@ -0,0 +1,31 @@ +// doc: https://nhnent.github.io/tui.editor/api/latest/ToastUIEditor.html#ToastUIEditor +export default { + minHeight: '200px', + previewStyle: 'vertical', + useCommandShortcut: true, + useDefaultHTMLSanitizer: true, + usageStatistics: false, + hideModeSwitch: false, + toolbarItems: [ + 'heading', + 'bold', + 'italic', + 'strike', + 'divider', + 'hr', + 'quote', + 'divider', + 'ul', + 'ol', + 'task', + 'indent', + 'outdent', + 'divider', + 'table', + 'image', + 'link', + 'divider', + 'code', + 'codeblock' + ] +} diff --git a/src/components/MarkdownEditor/index.vue b/src/components/MarkdownEditor/index.vue index 9847668a..4a6d8b0f 100644 --- a/src/components/MarkdownEditor/index.vue +++ b/src/components/MarkdownEditor/index.vue @@ -1,16 +1,18 @@