mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-21 20:21:03 +10:00
feat: draw.io (diagrams.net) integration (#215)
* draw.io init * updates
This commit is contained in:
@ -52,3 +52,12 @@ export async function svgStringToFile(
|
||||
const blob = new Blob([svgString], { type: "image/svg+xml" });
|
||||
return new File([blob], fileName, { type: "image/svg+xml" });
|
||||
}
|
||||
|
||||
export function decodeBase64ToSvgString(base64Data: string): string {
|
||||
const base64Prefix = 'data:image/svg+xml;base64,';
|
||||
if (base64Data.startsWith(base64Prefix)) {
|
||||
base64Data = base64Data.replace(base64Prefix, '');
|
||||
}
|
||||
|
||||
return atob(base64Data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user