From b348def6f6535696e3e264fed3e2bae50508e675 Mon Sep 17 00:00:00 2001 From: Zsolt Viczian Date: Mon, 22 Nov 2021 18:57:18 +0100 Subject: [PATCH] 1.4.12 - fixed lib export + preview without theme --- manifest.json | 2 +- src/main.ts | 8 +++++--- versions.json | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 401f6cc..1554694 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-excalidraw-plugin", "name": "Excalidraw", - "version": "1.4.11", + "version": "1.4.12", "minAppVersion": "0.12.16", "description": "An Obsidian plugin to edit and view Excalidraw drawings", "author": "Zsolt Viczian", diff --git a/src/main.ts b/src/main.ts index 50b2c7a..0bb40e0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -242,9 +242,11 @@ export default class ExcalidrawPlugin extends Plugin { const theme = this.settings.previewMatchObsidianTheme ? (isObsidianThemeDark() ? "dark" : "light") - : undefined; + : (!this.settings.exportWithTheme + ? "light" + : undefined); if(theme) exportSettings.withTheme = true; - const loader = new EmbeddedFilesLoader(this,this.settings.previewMatchObsidianTheme?isObsidianThemeDark():undefined); + const loader = new EmbeddedFilesLoader(this,theme?(theme==="dark"):undefined); if(!this.settings.displaySVGInPreview) { const width = parseInt(imgAttributes.fwidth); @@ -556,7 +558,7 @@ export default class ExcalidrawPlugin extends Plugin { }); return; } - download('data:text/plain;charset=utf-8',encodeURIComponent(this.settings.library), 'my-obsidian-library.excalidrawlib'); + download('data:text/plain;charset=utf-8',encodeURIComponent(JSON.stringify(this.settings.library2,null,"\t")), 'my-obsidian-library.excalidrawlib'); }, }); diff --git a/versions.json b/versions.json index 736124b..65c41b2 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,4 @@ { - "1.4.11": "0.12.16", + "1.4.12": "0.12.16", "1.4.2": "0.11.13" }