From fadab4eacb102163ca615228d0542bb5f4550006 Mon Sep 17 00:00:00 2001 From: wangqiao Date: Thu, 28 Aug 2025 17:41:36 +0800 Subject: [PATCH] Replace TinyMCE with WangEditor and update dependencies --- nuxt.config.ts | 5 +- package.json | 2 + pages/channel/create/index.vue | 270 ++++++++++---------------- plugins/wang-editor.ts | 6 + types/global.d.ts | 44 +++-- yarn.lock | 339 ++++++++++++++++++++++++++++++++- 6 files changed, 478 insertions(+), 188 deletions(-) create mode 100644 plugins/wang-editor.ts diff --git a/nuxt.config.ts b/nuxt.config.ts index 4472021..e9eacf6 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -123,7 +123,10 @@ export default defineNuxtConfig({ }, plugins: [ // 在这里引入插件 - // { src: "~plugins/tinymce" ,ssr: false}, + { + src: '~/plugins/wang-editor', + mode: 'client', + }, ], piniaPluginPersistedstate: { storage: 'localStorage', diff --git a/package.json b/package.json index afa1051..1e41d65 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "@pinia/nuxt": "^0.11.2", "@tinymce/tinymce-vue": "^5.0.0", "@types/tinymce": "^5.5.0", + "@wangeditor/editor": "^5.1.23", + "@wangeditor/editor-for-vue": "^5.1.12", "decimal.js": "^10.6.0", "echarts": "^6.0.0", "mqtt": "^5.14.0", diff --git a/pages/channel/create/index.vue b/pages/channel/create/index.vue index bbef2ed..b6044ab 100644 --- a/pages/channel/create/index.vue +++ b/pages/channel/create/index.vue @@ -1,18 +1,18 @@