From f3516c69682b55e682e3a663be8cacfa49c80c95 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 9 Oct 2023 12:13:17 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/9370 --- app/src/protyle/util/insertHTML.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts index de7367fa7..2c81d1d89 100644 --- a/app/src/protyle/util/insertHTML.ts +++ b/app/src/protyle/util/insertHTML.ts @@ -119,7 +119,9 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false, // 粘贴带样式的行内元素到另一个行内元素中需进行切割 const spanElement = range.startContainer.nodeType === 3 ? range.startContainer.parentElement : range.startContainer as HTMLElement; if (spanElement.tagName === "SPAN" && spanElement.isSameNode(range.endContainer.nodeType === 3 ? range.endContainer.parentElement : range.endContainer) && - tempElement.content.querySelector("span") // 粘贴纯文本不需切割 https://ld246.com/article/1665556907936 + // 粘贴纯文本不需切割 https://ld246.com/article/1665556907936 + // emoji 图片需要切割 https://github.com/siyuan-note/siyuan/issues/9370 + tempElement.content.querySelector("span, img") ) { const afterElement = document.createElement("span"); const attributes = spanElement.attributes;