diff --git a/manifest.json b/manifest.json index 3c5d8f0..ac1ceb0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-excalidraw-plugin", "name": "Excalidraw", - "version": "1.0.8", + "version": "1.0.9", "minAppVersion": "0.11.13", "description": "An Obsidian plugin to edit and view Excalidraw drawings", "author": "Zsolt Viczian", diff --git a/src/ExcalidrawTemplate.ts b/src/ExcalidrawTemplate.ts index cc55db6..972a453 100644 --- a/src/ExcalidrawTemplate.ts +++ b/src/ExcalidrawTemplate.ts @@ -141,7 +141,7 @@ export function initExcalidrawAutomate(plugin: ExcalidrawPlugin) { this.canvas.theme = "light"; return "light"; default: - this.canvas = "dark"; + this.canvas.theme = "dark"; return "dark"; } }, @@ -152,7 +152,8 @@ export function initExcalidrawAutomate(plugin: ExcalidrawPlugin) { }); }, async toClipboard(templatePath?:string) { - let elements = templatePath ? (await getTemplate(templatePath)).elements : []; + const template = templatePath ? (await getTemplate(templatePath)) : null; + let elements = template ? template.elements : []; for (let i=0;i