From e22513e69859e0562d216622985b063c09aa5826 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期一, 01 七月 2024 16:08:29 +0800
Subject: [PATCH] chore:更换ueditor

---
 src/views/exam/components/answer-main/answer-short/index.vue |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/views/exam/components/answer-main/answer-short/index.vue b/src/views/exam/components/answer-main/answer-short/index.vue
index a305c56..ced961f 100644
--- a/src/views/exam/components/answer-main/answer-short/index.vue
+++ b/src/views/exam/components/answer-main/answer-short/index.vue
@@ -5,9 +5,10 @@
       <ExamInfo class="mb-5" :questionIndex="currentIndex" :activeQuestion="activeQuestion"></ExamInfo>
 
       <div class="answer-content">
-        
+        <vue-ueditor-wrap v-model="content" editor-id="editor" :config="editorConfig"
+          :editorDependencies="['ueditor.config.js', 'ueditor.all.js']" />
       </div>
-
+      <el-button @click="testClick">鍐呭鏄剧ず</el-button>
     </el-scrollbar>
   </div>
 </template>
@@ -20,10 +21,32 @@
 
 const examStore = useExamStore();
 
+const content = ref('');
+const editorConfig = {
+  // 鍚庣鏈嶅姟鍦板潃锛屽悗绔鐞嗗弬鑰�
+  // https://open-doc.modstart.com/ueditor-plus/backend.html
+  serverUrl: '/api/path/to/server',
+  UEDITOR_HOME_URL: '/static/UEditorPlus/',
+  UEDITOR_CORS_URL: '/static/UEditorPlus/',
+  initialFrameWidth: '90%',
+  initialFrameHeight: 400,
+  toolbars: [
+    ['fullscreen','source', 'undo','redo', '|', 'fontfamily', 'fontsize', '|',
+      'forecolor', 'backcolor', 'bold', 'italic', 'underline','strikethrough','|',
+     'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|',
+      'inserttable', 'deletetable', 'insertparagraph', 'insertrow', 'deleterow',
+      'insertcol', 'deletecol','mergecells','mergerow','mergecol', 'splittocells',
+     'splittorows','splittocols', '|', 'formula']
+  ]
+};
+
 const { currentType, currentIndex } = storeToRefs(examStore);
 
 const activeQuestion = ref(examStore.getActiveQuestion);
 
+const testClick = () => {
+  console.log(content.value);
+}
 
 </script>
 

--
Gitblit v1.8.0