feat: add xmlsvg export option (#761)

* feat: add xmlsvg export option

* fix: avoid atob for xmlsvg export to prevent UTF-8 corruption

Pass the data URL directly (like PNG export) instead of decoding
with atob(). atob() + Blob([string]) double-encodes non-ASCII
characters (Chinese, Japanese, emoji), corrupting the output file.

---------

Co-authored-by: dayuan.jiang <jdy.toh@gmail.com>
This commit is contained in:
zongxi1115
2026-04-03 07:50:57 +08:00
committed by GitHub
parent 29538782fc
commit cb8127920c
6 changed files with 24 additions and 8 deletions

View File

@@ -140,7 +140,8 @@
"formats": {
"drawio": "Draw.io XML",
"png": "PNG Image",
"svg": "SVG Image"
"svg": "SVG Image",
"xmlsvg": "Editable SVG"
},
"savedSuccessfully": "Saved successfully!"
},

View File

@@ -140,7 +140,8 @@
"formats": {
"drawio": "Draw.io XML",
"png": "PNG 画像",
"svg": "SVG 画像"
"svg": "SVG 画像",
"xmlsvg": "編集可能 SVG"
},
"savedSuccessfully": "保存完了!"
},

View File

@@ -140,7 +140,8 @@
"formats": {
"drawio": "Draw.io XML",
"png": "PNG 圖片",
"svg": "SVG 圖片"
"svg": "SVG 圖片",
"xmlsvg": "可編輯 SVG"
},
"savedSuccessfully": "儲存成功!"
},

View File

@@ -140,7 +140,8 @@
"formats": {
"drawio": "Draw.io XML",
"png": "PNG 图片",
"svg": "SVG 图片"
"svg": "SVG 图片",
"xmlsvg": "可编辑 SVG"
},
"savedSuccessfully": "保存成功!"
},