1.4.12 - fixed lib export + preview without theme

This commit is contained in:
Zsolt Viczian
2021-11-22 18:57:18 +01:00
parent d57c59e9eb
commit b348def6f6
3 changed files with 7 additions and 5 deletions

View File

@@ -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",

View File

@@ -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');
},
});

View File

@@ -1,4 +1,4 @@
{
"1.4.11": "0.12.16",
"1.4.12": "0.12.16",
"1.4.2": "0.11.13"
}