mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
This commit is contained in:
parent
e62ccfc239
commit
de3373b8b9
1 changed files with 12 additions and 0 deletions
|
|
@ -646,6 +646,18 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
|
|||
cursorElements.push(item.nextElementSibling);
|
||||
}
|
||||
});
|
||||
} else if (operation.nextID) {
|
||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.nextID}"]`)).forEach(item => {
|
||||
const embedElement = isInEmbedBlock(item);
|
||||
if (embedElement) {
|
||||
// https://github.com/siyuan-note/siyuan/issues/5524
|
||||
embedElement.removeAttribute("data-render");
|
||||
blockRender(protyle, embedElement);
|
||||
} else {
|
||||
item.insertAdjacentHTML("beforebegin", operation.data);
|
||||
cursorElements.push(item.previousElementSibling);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (!protyle.options.backlinkData && operation.parentID === protyle.block.parentID) {
|
||||
protyle.wysiwyg.element.insertAdjacentHTML("afterbegin", operation.data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue