mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 21:38:48 +01:00
This commit is contained in:
parent
a8560b365b
commit
8f73915322
2 changed files with 7 additions and 5 deletions
|
|
@ -129,7 +129,7 @@ class Protyle {
|
|||
}
|
||||
}
|
||||
// update ref
|
||||
this.protyle.wysiwyg.element.querySelectorAll(`[data-type="~block-ref"][data-id="${data.data.id}"]`).forEach(item => {
|
||||
this.protyle.wysiwyg.element.querySelectorAll(`[data-type~="block-ref"][data-id="${data.data.id}"]`).forEach(item => {
|
||||
if (item.getAttribute("data-subtype") === "d") {
|
||||
item.textContent = data.data.title;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -578,15 +578,17 @@ export class Toolbar {
|
|||
protyle.toolbar.showRender(protyle, newNodes[0] as HTMLElement, undefined, html);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (type === "inline-memo") {
|
||||
} else if (type === "inline-memo") {
|
||||
protyle.toolbar.showRender(protyle, newNodes[0] as HTMLElement, newNodes as Element[], html);
|
||||
return;
|
||||
}
|
||||
if (type === "a") {
|
||||
} else if (type === "block-ref") {
|
||||
this.range.collapse(false);
|
||||
} else if (type === "a") {
|
||||
const aElement = newNodes[0] as HTMLElement
|
||||
if (aElement.textContent.replace(Constants.ZWSP, "") === "" || !aElement.getAttribute("data-href")) {
|
||||
linkMenu(protyle, aElement, aElement.getAttribute("data-href") ? true : false);
|
||||
} else {
|
||||
this.range.collapse(false);
|
||||
}
|
||||
}
|
||||
nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue