From 04095ea59a1e28a0105020474efd9fe992757595 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 8 Mar 2025 17:47:55 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14144 --- app/src/protyle/util/paste.ts | 1 + app/src/protyle/wysiwyg/index.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts index b43e20466..5de51d31a 100644 --- a/app/src/protyle/util/paste.ts +++ b/app/src/protyle/util/paste.ts @@ -91,6 +91,7 @@ export const getPlainText = (blockElement: HTMLElement, isNested = false) => { text = text.slice(0, -1) + "\n"; } }); + text = text.slice(0, -1); } else if (!isNested && ["NodeBlockquote", "NodeList", "NodeSuperBlock", "NodeListItem"].includes(dataType)) { blockElement.querySelectorAll("[data-node-id]").forEach((item: HTMLElement) => { const nestedText = getPlainText(item, true); diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index b7b7d02a0..121c3cc1b 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1318,7 +1318,7 @@ export class WYSIWYG { textPlain = textPlain.slice(0, -1) + "\n"; } }); - copyPlainText(textPlain); + copyPlainText(textPlain.slice(0, -1)); focusBlock(tableBlockElement); } }