From d465fd6b47e2ff3e0d325f12634398e329559b1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=83=9D=E5=85=88=E7=91=9E?= <1490493387@qq.com>
Date: Fri, 7 Jan 2022 23:58:25 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB?=
=?UTF-8?q?=E5=92=8C=E5=95=86=E5=93=81=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF?=
=?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=94=B9=E9=80=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 20 +-
package.json | 3 +
src/components/Tinymce/Index.vue | 255 ++++++++++++++++++
.../Tinymce/components/EditorImage.vue | 152 +++++++++++
src/components/Tinymce/config.ts | 8 +
.../pms/goods/components/GoodsCategory.vue | 24 +-
src/views/pms/goods/components/GoodsInfo.vue | 232 ++++++++--------
7 files changed, 574 insertions(+), 120 deletions(-)
create mode 100644 src/components/Tinymce/Index.vue
create mode 100644 src/components/Tinymce/components/EditorImage.vue
create mode 100644 src/components/Tinymce/config.ts
diff --git a/README.md b/README.md
index 82e1b09f..56a67335 100644
--- a/README.md
+++ b/README.md
@@ -503,7 +503,7 @@ vite-plugin-svg-icons 使用说明:https://github.com/anncwb/vite-plugin-svg-i
**安装**
```
-npm i vite-plugin-svg-icons -D
+npm i -D vite-plugin-svg-icons
```
@@ -550,4 +550,20 @@ router.afterEach(() => {
NProgress.done()
})
-```
\ No newline at end of file
+```
+
+## TinyMCE 富文本编辑器
+
+**官网:** http://tinymce.ax-z.cn/integrations/integrate-index.php
+
+**安装**
+
+```
+npm i -S tinymce
+
+npm i -S @tinymce/tinymce-vue
+
+npm i -D @types/tinymce
+```
+
+
diff --git a/package.json b/package.json
index 1c803cbf..bd620750 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,7 @@
},
"dependencies": {
"@element-plus/icons": "0.0.11",
+ "@tinymce/tinymce-vue": "^4.0.5",
"axios": "^0.24.0",
"element-plus": "^1.2.0-beta.6",
"nprogress": "^0.2.0",
@@ -15,6 +16,7 @@
"path-to-regexp": "^6.2.0",
"pinia": "^2.0.9",
"screenfull": "^6.0.0",
+ "tinymce": "^5.10.2",
"vue": "^3.2.16",
"vue-router": "^4.0.12"
},
@@ -22,6 +24,7 @@
"@types/node": "^16.11.7",
"@types/nprogress": "^0.2.0",
"@types/path-browserify": "^1.0.0",
+ "@types/tinymce": "^4.6.4",
"@vitejs/plugin-vue": "^1.9.3",
"sass": "^1.43.4",
"typescript": "^4.4.3",
diff --git a/src/components/Tinymce/Index.vue b/src/components/Tinymce/Index.vue
new file mode 100644
index 00000000..4ec6849e
--- /dev/null
+++ b/src/components/Tinymce/Index.vue
@@ -0,0 +1,255 @@
+
+