Vanessa 2025-03-08 17:47:55 +08:00
parent 1ad7ec8803
commit 04095ea59a
2 changed files with 2 additions and 1 deletions

View file

@ -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);

View file

@ -1318,7 +1318,7 @@ export class WYSIWYG {
textPlain = textPlain.slice(0, -1) + "\n";
}
});
copyPlainText(textPlain);
copyPlainText(textPlain.slice(0, -1));
focusBlock(tableBlockElement);
}
}