From 661d8b3d81fcbdad133aa8c912ab5a7b1b9731c1 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 1 May 2023 11:52:49 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/8138 --- app/src/protyle/hint/index.ts | 1 + app/src/protyle/wysiwyg/keydown.ts | 2 ++ 2 files changed, 3 insertions(+) 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);