Skip to content

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

:bug: fix https://github.com/siyuan-note/siyuan/issues/4911

Vanessae35ab0db64da
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index b0238ff65f..f45102afcd 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -373,8 +373,10 @@ export class WYSIWYG {
parentElement = getContenteditableElement(nodeElement);
}
if (parentElement) {
+ // 引用文本剪切 https://ld246.com/article/1647689760545
+ // 表格多行剪切 https://ld246.com/article/1652603836350
Array.from(parentElement.children).forEach(item => {
- if (item.textContent === "") {
+ if (item.textContent === "" && (item.nodeType === 1 && item.tagName !== "BR")) {
item.remove();
}
});