This commit is contained in:
Vanessa 2022-10-09 09:31:11 +08:00
parent e2eca1186d
commit 424066a858
2 changed files with 2 additions and 2 deletions

View file

@ -392,7 +392,7 @@ export class Backlink extends Model {
editorElement.setAttribute("data-ismention", isMention ? "true" : "false");
liElement.after(editorElement);
const editor = new Protyle(editorElement, {
blockId: "",
blockId: docId,
backlinkData: isMention ? response.data.backmentions : response.data.backlinks,
render: {
background: false,
@ -402,7 +402,6 @@ export class Backlink extends Model {
breadcrumb: false,
}
});
editor.protyle.block.rootID = docId;
this.editors.push(editor);
});
}

View file

@ -159,6 +159,7 @@ export class Protyle {
});
setPadding(this.protyle);
if (options.backlinkData) {
this.protyle.block.rootID = options.blockId;
renderBacklink(this.protyle, options.backlinkData);
return;
}