From ac26d0248d14ee2fc2b9645fd373228565896784 Mon Sep 17 00:00:00 2001 From: gannonsun Date: Thu, 22 Dec 2022 18:06:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8B=96=E6=8B=BD=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=B8=8A=E7=9A=84img=E5=85=83=E7=B4=A0=E5=88=B0=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E5=86=85=E5=8F=98=E6=88=90=E8=B6=85=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/basic-modules/src/modules/link/plugin.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/basic-modules/src/modules/link/plugin.ts b/packages/basic-modules/src/modules/link/plugin.ts index 0d23e0cef..618311b44 100644 --- a/packages/basic-modules/src/modules/link/plugin.ts +++ b/packages/basic-modules/src/modules/link/plugin.ts @@ -32,6 +32,12 @@ function withLink(editor: T): T { return } + // 单图插入 + if (/]+>/.test(data.getData('text/html'))) { + insertData(data) + return + } + // 插入链接 if (isMenuDisabled(newEditor)) return // disabled const { selection } = newEditor