Uploads to same folder

This commit is contained in:
Zef Hemel
2023-07-07 13:09:44 +02:00
parent 04d6de18e6
commit fd6f81d500
5 changed files with 51 additions and 26 deletions
+4
View File
@@ -17,6 +17,8 @@ import {
findParentMatching,
nodeAtPos,
} from "../../plug-api/lib/tree.ts";
import { folderName, resolve } from "../../common/path.ts";
const turndownService = new TurndownService({
hr: "---",
codeBlockStyle: "fenced",
@@ -202,6 +204,8 @@ export function attachmentExtension(editor: Editor) {
return;
}
suggestedName = resolve(folderName(editor.currentPage!), suggestedName);
const finalFileName = await editor.prompt(
"File name for pasted attachment",
suggestedName,