Uploads to same folder
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user