diff --git a/manifest.json b/manifest.json index 0c72845..f66635f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-excalidraw-plugin", "name": "Excalidraw", - "version": "1.4.6", + "version": "1.4.7", "minAppVersion": "0.12.16", "description": "An Obsidian plugin to edit and view Excalidraw drawings", "author": "Zsolt Viczian", diff --git a/src/ExcalidrawAutomate.ts b/src/ExcalidrawAutomate.ts index e7b72f9..a042fb9 100644 --- a/src/ExcalidrawAutomate.ts +++ b/src/ExcalidrawAutomate.ts @@ -71,7 +71,7 @@ export interface ExcalidrawAutomate { } } ):Promise; - createSVG (templatePath?:string, embedFont?:boolean):Promise; + createSVG (templatePath?:string, embedFont?:boolean, withTheme?:boolean, withBackgroundColor?:boolean):Promise; createPNG (templatePath?:string):Promise; wrapText (text:string, lineLen:number):string; addRect (topX:number, topY:number, width:number, height:number):string; @@ -336,7 +336,7 @@ export async function initExcalidrawAutomate(plugin: ExcalidrawPlugin):Promise { + async createSVG(templatePath?:string,embedFont:boolean = false,withTheme?:boolean, withBackgroundColor?:boolean):Promise { const automateElements = this.getElements(); const template = templatePath ? (await getTemplate(this.plugin,templatePath,true)) : null; let elements = template ? template.elements : []; @@ -348,14 +348,14 @@ export async function initExcalidrawAutomate(plugin: ExcalidrawPlugin):Promise { plugin.ea.reset(); - return svgToBase64((await plugin.ea.createSVG(file.path,true)).outerHTML) as DataURL; + return svgToBase64((await plugin.ea.createSVG(file.path,true,false,false)).outerHTML) as DataURL; } const excalidrawSVG = isExcalidrawFile @@ -334,7 +334,7 @@ export const generateSVGString = async (scene:any, settings: ExcalidrawSettings) } const svg = await getSVG(scene,exportSettings); if(svg) { - return wrapText(html_beautify(svg.outerHTML,{"indent_with_tabs": true}),4096,true);// html_beautify(svg.outerHTML,{"indent_with_tabs": true}); + return wrapText(html_beautify(svg.outerHTML,{"indent_with_tabs": true}),4096,true); } return null; } diff --git a/versions.json b/versions.json index aa3dca3..62195f2 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,4 @@ { - "1.4.6": "0.12.16", + "1.4.7": "0.12.16", "1.4.2": "0.11.13" }