mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 08:48:49 +01:00
This commit is contained in:
parent
e5f9d6a395
commit
7ae632ec38
2 changed files with 5 additions and 2 deletions
|
|
@ -1404,7 +1404,7 @@ export class WYSIWYG {
|
|||
const backlinkBreadcrumbItemElement = hasClosestByClassName(event.target, "protyle-breadcrumb__item");
|
||||
if (backlinkBreadcrumbItemElement) {
|
||||
if (backlinkBreadcrumbItemElement.getAttribute("data-id")) {
|
||||
loadBreadcrumb(backlinkBreadcrumbItemElement);
|
||||
loadBreadcrumb(protyle, backlinkBreadcrumbItemElement);
|
||||
} else {
|
||||
// 引用标题时的更多加载
|
||||
getBacklinkHeadingMore(backlinkBreadcrumbItemElement);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ const setBacklinkFold = (html: string, expand: boolean) => {
|
|||
return tempDom.innerHTML;
|
||||
};
|
||||
|
||||
export const loadBreadcrumb = (element: HTMLElement) => {
|
||||
export const loadBreadcrumb = (protyle: IProtyle, element: HTMLElement) => {
|
||||
fetchPost("/api/filetree/getDoc", {
|
||||
id: element.getAttribute("data-id"),
|
||||
size: Constants.SIZE_GET_MAX,
|
||||
|
|
@ -62,6 +62,9 @@ export const loadBreadcrumb = (element: HTMLElement) => {
|
|||
tempElement.remove();
|
||||
}
|
||||
element.parentElement.insertAdjacentHTML("afterend", setBacklinkFold(getResponse.data.content, true));
|
||||
processRender(protyle.wysiwyg.element);
|
||||
highlightRender(protyle.wysiwyg.element);
|
||||
blockRender(protyle, protyle.wysiwyg.element);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue