소스 검색

修改表格空格及粘贴问题

yangg 5 달 전
부모
커밋
895cf541ce

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/index.html


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/chunk-254d7140.09491333.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.c81b9871.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.ccb1fe7b.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/chunk-254d7140.c5cd71f3.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/chunk-4d7db996.c0111a52.js


+ 27 - 0
src/components/CanvasEditor/index.vue

@@ -767,6 +767,33 @@ export default {
       } catch (error) {
         console.error('Apply bold failed:', error);
       }
+    },
+    // 添加自定义粘贴处理方法
+    handlePaste(e) {
+      try {
+        if (!this.editorRef) return;
+        
+        // 阻止默认粘贴行为
+        e.preventDefault();
+        
+        // 尝试从剪贴板获取文本
+        let text = '';
+        
+        // 使用 clipboardData 获取粘贴内容
+        if (e.clipboardData && e.clipboardData.getData) {
+          text = e.clipboardData.getData('text/plain');
+        } else if (window.clipboardData && window.clipboardData.getData) {
+          // IE 兼容
+          text = window.clipboardData.getData('Text');
+        }
+        
+        // 如果获取到文本,则执行粘贴
+        if (text) {
+          this.editorRef.command.executeInsertText(text);
+        }
+      } catch (error) {
+        console.error('Custom paste handler failed:', error);
+      }
     }
   },
   mounted() {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.