diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index 06eff5de7..cfc57560c 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -474,6 +474,7 @@ ${unicode2Emoji(emoji.unicode, true)}`; fetchPost("/api/filetree/createDocWithMd", { notebook: protyle.notebookId, path: pathPosix().join(pathString, realFileName), + parentID: protyle.block.rootID, markdown: "" }, response => { protyle.toolbar.setInlineMark(protyle, "block-ref", "range", { diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 4b9f8604e..35712b873 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1078,6 +1078,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { fetchPost("/api/filetree/createDocWithMd", { notebook: protyle.notebookId, path: pathPosix().join(response.data, newFileName), + parentID: protyle.block.rootID, markdown: "" }, response => { insertHTML(`${escapeHtml(newFileName.substring(0, window.siyuan.config.editor.blockRefDynamicAnchorTextMaxLen))}`, protyle); @@ -1102,6 +1103,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { fetchPost("/api/filetree/createDocWithMd", { notebook: protyle.notebookId, path: pathPosix().join(pathString, newFileName), + parentID: protyle.block.rootID, markdown: "" }, response => { insertHTML(`${escapeHtml(newFileName.substring(0, window.siyuan.config.editor.blockRefDynamicAnchorTextMaxLen))}`, protyle);