mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
This commit is contained in:
parent
d84538da74
commit
fe28779608
1 changed files with 2 additions and 2 deletions
|
|
@ -698,7 +698,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
|
||||||
}
|
}
|
||||||
} else if (updateElements.length > 0) {
|
} else if (updateElements.length > 0) {
|
||||||
const parentElement = protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.parentID}"]`);
|
const parentElement = protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.parentID}"]`);
|
||||||
if (!protyle.options.backlinkData && operation.parentID === protyle.block.parentID) {
|
if (!protyle.options.backlinkData && operation.parentID === protyle.block.parentID && !protyle.block.showAll) {
|
||||||
protyle.wysiwyg.element.prepend(processClonePHElement(updateElements[0].cloneNode(true) as Element));
|
protyle.wysiwyg.element.prepend(processClonePHElement(updateElements[0].cloneNode(true) as Element));
|
||||||
hasFind = true;
|
hasFind = true;
|
||||||
} else if (parentElement.length === 0 && protyle.options.backlinkData && isUndo && getSelection().rangeCount > 0) {
|
} else if (parentElement.length === 0 && protyle.options.backlinkData && isUndo && getSelection().rangeCount > 0) {
|
||||||
|
|
@ -800,7 +800,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const parentElement = protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.parentID}"]`);
|
const parentElement = protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.parentID}"]`);
|
||||||
if (!protyle.options.backlinkData && operation.parentID === protyle.block.parentID) {
|
if (!protyle.options.backlinkData && operation.parentID === protyle.block.parentID && !protyle.block.showAll) {
|
||||||
protyle.wysiwyg.element.insertAdjacentHTML("afterbegin", operation.data);
|
protyle.wysiwyg.element.insertAdjacentHTML("afterbegin", operation.data);
|
||||||
cursorElements.push(protyle.wysiwyg.element.firstElementChild);
|
cursorElements.push(protyle.wysiwyg.element.firstElementChild);
|
||||||
} else if (parentElement.length === 0 && protyle.options.backlinkData && isUndo && getSelection().rangeCount > 0) {
|
} else if (parentElement.length === 0 && protyle.options.backlinkData && isUndo && getSelection().rangeCount > 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue