Vanessa 2023-05-01 11:52:49 +08:00
parent d9b42b5029
commit 661d8b3d81
2 changed files with 3 additions and 0 deletions

View file

@ -474,6 +474,7 @@ ${unicode2Emoji(emoji.unicode, true)}</button>`;
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", {

View file

@ -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(`<span data-type="block-ref" data-id="${response.data}" data-subtype="d">${escapeHtml(newFileName.substring(0, window.siyuan.config.editor.blockRefDynamicAnchorTextMaxLen))}</span>`, 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(`<span data-type="block-ref" data-id="${response.data}" data-subtype="d">${escapeHtml(newFileName.substring(0, window.siyuan.config.editor.blockRefDynamicAnchorTextMaxLen))}</span>`, protyle);