diff --git a/package.json b/package.json index e9d75e2..3a86da1 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "dependencies": { "@types/temp": "^0.9.0", "lookpath": "^1.2.0", + "js-base64": "^3.7.2", "temp": "^0.9.4", "yaml": "^2.0.0-4" } diff --git a/renderer.ts b/renderer.ts index c6a2da4..41db1c9 100644 --- a/renderer.ts +++ b/renderer.ts @@ -10,6 +10,7 @@ import * as path from 'path'; import * as fs from 'fs'; import * as YAML from 'yaml'; +import { Base64 } from 'js-base64'; import { FileSystemAdapter, MarkdownRenderer, MarkdownView, Notice } from 'obsidian'; @@ -267,7 +268,7 @@ function convertSVGToPNG(svg: SVGSVGElement, scale: number = 1): Promise { svgImg.onload = () => { ctx.drawImage(svgImg, 0, 0, canvas.width, canvas.height);