From ea2294e901532563b2d0da4c8edd029ad481f487 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 4 Sep 2025 12:11:22 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/15761 --- app/src/protyle/wysiwyg/input.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index 21105e8c9..8ec43da4a 100644 --- a/app/src/protyle/wysiwyg/input.ts +++ b/app/src/protyle/wysiwyg/input.ts @@ -37,6 +37,10 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: } else if (type === "NodeBlockQueryEmbed") { blockElement.lastElementChild.previousElementSibling.innerHTML = "" + Constants.ZWSP; } else if (type === "NodeMathBlock" || type === "NodeHTMLBlock") { + // https://github.com/siyuan-note/siyuan/issues/15761 + if (blockElement.firstElementChild.firstChild.nodeType === 3) { + blockElement.firstElementChild.firstChild.remove(); + } blockElement.lastElementChild.previousElementSibling.lastElementChild.innerHTML = "" + Constants.ZWSP; } else if (type === "NodeIFrame" || type === "NodeWidget") { blockElement.innerHTML = "" + blockElement.firstElementChild.outerHTML + blockElement.lastElementChild.outerHTML;