fix: importer bugs and editor bugs

This commit is contained in:
hugo committed 2026-02-14 21:24:01 +01:00
1 parent b036cf3c46
commit 4b31d9d421
9 files changed
+281 -24

No files matched your search

+5 -2
View File
@@ -336,8 +336,11 @@ export function registerIpcHandlers(): void {
});
safeHandle('media:getUrl', async (_, id: string) => {
// Returns the bds-media:// protocol URL for a media item
return `bds-media://${id}`;
// Returns the relative path for a media item (e.g. media/2025/01/uuid.jpg)
// This is the format used in markdown content for image references
const engine = getMediaEngine();
const relativePath = await engine.getRelativePath(id);
return relativePath ?? `media/${id}`;
});
safeHandle('media:getFilePath', async (_, id: string) => {