From 454538baece245c12b3b97903d510fa13cdc0a28 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 10 Feb 2023 15:30:30 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7325 --- app/src/protyle/upload/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/upload/index.ts b/app/src/protyle/upload/index.ts index 486d0d8ed..dbdb29e1b 100644 --- a/app/src/protyle/upload/index.ts +++ b/app/src/protyle/upload/index.ts @@ -110,8 +110,8 @@ const genUploadedLabel = (responseText: string, protyle: IProtyle) => { } }); const range = getEditorRange(protyle.wysiwyg.element); - if (!succFileText.startsWith("<") && range.toString() === "" && range.startContainer.nodeType === 3 && protyle.toolbar.getCurrentType(range).length > 0) { - // 防止链接插入其他元素中 + if (range.toString() === "" && range.startContainer.nodeType === 3 && protyle.toolbar.getCurrentType(range).length > 0) { + // 防止链接插入其他元素中 https://ld246.com/article/1676003478664 range.setEndAfter(range.startContainer.parentElement); range.collapse(false); }