mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-06 23:51:48 +01:00
This commit is contained in:
parent
d9b42b5029
commit
661d8b3d81
2 changed files with 3 additions and 0 deletions
|
|
@ -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", {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue