Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/canvas-preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Canvas preview helper
* Opens generated canvas files and shows a confirmation notice
*/

import { App, Notice } from "obsidian";

export async function openGeneratedCanvasPreview(
app: App,
canvasPath: string
): Promise<void> {
await app.workspace.openLinkText(canvasPath, "", "tab");
const filename = canvasPath.split("/").pop() ?? canvasPath;
new Notice(`Canvas generated: ${filename} — opened in new tab`);
}
Loading
Loading