From 1a9da07df3c176630f167ee85760481b68772fd2 Mon Sep 17 00:00:00 2001 From: Coffee-crocodile <1147347984@qq.com> Date: Wed, 21 Jun 2023 18:07:28 +0800 Subject: [PATCH] chore(rich): modify to tinymce --- package.json | 3 +- .../index.vue} | 4 +- src/components/custom/Editor/RichEditor.vue | 9 -- .../custom/Editor/RichTextEditor/index.vue | 112 ++++++++++++++++++ src/components/custom/Editor/index.ts | 4 - src/views/plugin/editor/md/index.vue | 2 +- src/views/plugin/editor/rich/index.vue | 41 +------ 7 files changed, 120 insertions(+), 55 deletions(-) rename src/components/custom/Editor/{MdEditor.vue => MarkDownEditor/index.vue} (86%) delete mode 100644 src/components/custom/Editor/RichEditor.vue create mode 100644 src/components/custom/Editor/RichTextEditor/index.vue delete mode 100644 src/components/custom/Editor/index.ts diff --git a/package.json b/package.json index 0cc0c7d..ab47ae6 100644 --- a/package.json +++ b/package.json @@ -52,9 +52,8 @@ } }, "dependencies": { + "@tinymce/tinymce-vue": "^5.1.0", "@vueuse/core": "^10.2.0", - "@wangeditor/editor": "^5.1.23", - "@wangeditor/editor-for-vue": "^5.1.12", "axios": "^1.4.0", "crypto-js": "^4.1.1", "echarts": "^5.4.2", diff --git a/src/components/custom/Editor/MdEditor.vue b/src/components/custom/Editor/MarkDownEditor/index.vue similarity index 86% rename from src/components/custom/Editor/MdEditor.vue rename to src/components/custom/Editor/MarkDownEditor/index.vue index d1645b6..7c1fb0c 100644 --- a/src/components/custom/Editor/MdEditor.vue +++ b/src/components/custom/Editor/MarkDownEditor/index.vue @@ -1,4 +1,6 @@ - - - - diff --git a/src/components/custom/Editor/RichTextEditor/index.vue b/src/components/custom/Editor/RichTextEditor/index.vue new file mode 100644 index 0000000..f27d3c6 --- /dev/null +++ b/src/components/custom/Editor/RichTextEditor/index.vue @@ -0,0 +1,112 @@ + + + + + diff --git a/src/components/custom/Editor/index.ts b/src/components/custom/Editor/index.ts deleted file mode 100644 index ccce941..0000000 --- a/src/components/custom/Editor/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import MdEditor from './MdEditor.vue' -import RichEditor from './RichEditor.vue' - -export { MdEditor, RichEditor } diff --git a/src/views/plugin/editor/md/index.vue b/src/views/plugin/editor/md/index.vue index 95d2452..85c6a30 100644 --- a/src/views/plugin/editor/md/index.vue +++ b/src/views/plugin/editor/md/index.vue @@ -4,7 +4,7 @@ const text = ref('# Hello Editor ![图片描述](https://via.placeholder.com/350 diff --git a/src/views/plugin/editor/rich/index.vue b/src/views/plugin/editor/rich/index.vue index 09146d0..f4abcad 100644 --- a/src/views/plugin/editor/rich/index.vue +++ b/src/views/plugin/editor/rich/index.vue @@ -1,51 +1,16 @@