Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/14144

Vanessa04095ea59a1e
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index b43e204661..5de51d31a2 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 b7b7d02a05..121c3cc1b2 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);
}
}