mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 18:03:07 +08:00
This commit is contained in:
parent
5753de5b13
commit
1939eaa03b
@ -242,7 +242,7 @@ export const newFileByName = (app: App, value: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const newFileBySelect = (protyle: IProtyle, selectText: string, nodeElement: HTMLElement, pathDir: string, targetNotebookId: string) => {
|
export const newFileBySelect = (protyle: IProtyle, selectText: string, nodeElement: HTMLElement, pathDir: string, targetNotebookId: string) => {
|
||||||
const newFileName = replaceFileName(selectText.trim() ? selectText.trim() : protyle.lute.BlockDOM2Content(nodeElement.outerHTML).replace(/\n/g, "")) || window.siyuan.languages.untitled;
|
const newFileName = replaceFileName(selectText.trim() ? selectText.trim() : protyle.lute.BlockDOM2Content(nodeElement.outerHTML).replace(/\n/g, "").trim()) || window.siyuan.languages.untitled;
|
||||||
const hPath = pathPosix().join(pathDir, newFileName);
|
const hPath = pathPosix().join(pathDir, newFileName);
|
||||||
fetchPost("/api/filetree/getIDsByHPath", {
|
fetchPost("/api/filetree/getIDsByHPath", {
|
||||||
path: hPath,
|
path: hPath,
|
||||||
|
Loading…
Reference in New Issue
Block a user