This commit is contained in:
Vanessa 2023-02-25 16:22:39 +08:00
parent 6b1202be2a
commit 0b7eec276f
2 changed files with 9 additions and 8 deletions

View file

@ -437,6 +437,14 @@ export class Toolbar {
setFontStyle(inlineElement, textObj);
newNodes.push(inlineElement);
} else {
// https://github.com/siyuan-note/siyuan/issues/7477
if (type === "block-ref") {
contents.childNodes.forEach((item: HTMLElement, index) => {
if (index !== 0) {
item.remove();
}
});
}
contents.childNodes.forEach((item: HTMLElement, index) => {
if (item.nodeType === 3) {
if (index === 0 && previousElement && previousElement.nodeType !== 3 &&