From 67db6579e94d4781212b1bc06c66b9deaafa40f3 Mon Sep 17 00:00:00 2001 From: tim Date: Fri, 1 Aug 2025 10:41:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20vditor=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- open-isle-cli/src/utils/vditor.js | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/open-isle-cli/src/utils/vditor.js b/open-isle-cli/src/utils/vditor.js index 68b1a5bfe..2e9a2628c 100644 --- a/open-isle-cli/src/utils/vditor.js +++ b/open-isle-cli/src/utils/vditor.js @@ -162,27 +162,6 @@ export function createVditor(editorId, options = {}) { input, after }) - const container = document.getElementById(editorId) - if (container) { - container.addEventListener('paste', async (e) => { - const items = e.clipboardData && e.clipboardData.items - if (!items) return - const files = [] - for (let i = 0; i < items.length; i++) { - const item = items[i] - if (item.kind === 'file') { - const file = item.getAsFile() - if (file) files.push(file) - } - } - if (files.length > 0) { - e.preventDefault() - const err = await vditor.options.upload.handler(files) - if (typeof err === 'string') { - vditor.tip(err) - } - } - }) - } + return vditor }