Update packages/excalidraw/data/index.ts

This commit is contained in:
David Luzar 2025-04-14 19:23:42 +02:00 committed by GitHub
parent e9d5c3e002
commit 90cf344e7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -135,6 +135,8 @@ export const exportCanvas = async (
if (type === "svg") { if (type === "svg") {
return fileSave( return fileSave(
svgPromise.then((svg) => { svgPromise.then((svg) => {
// adding SVG preamble so that older software parse the SVG file
// properly
return new Blob([SVG_DOCUMENT_PREAMBLE + svg.outerHTML], { return new Blob([SVG_DOCUMENT_PREAMBLE + svg.outerHTML], {
type: MIME_TYPES.svg, type: MIME_TYPES.svg,
}); });