From 49e3a801130f5876fcce753ae82b9e186620bc47 Mon Sep 17 00:00:00 2001 From: wangshun Date: Fri, 30 Aug 2024 12:40:00 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=97=B6=E6=A0=B7=E5=BC=8F=E4=B8=8D=E5=85=A8=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E5=85=AC=E5=BC=8F=E6=A0=BC=E5=BC=8F=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/src/plugins/Export.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/simple-mind-map/src/plugins/Export.js b/simple-mind-map/src/plugins/Export.js index 52413970..54a460af 100644 --- a/simple-mind-map/src/plugins/Export.js +++ b/simple-mind-map/src/plugins/Export.js @@ -93,7 +93,15 @@ class Export { if (this.mindMap.richText) { const foreignObjectList = svg.find('foreignObject') if (foreignObjectList.length > 0) { - foreignObjectList[0].add(SVG(``)) + foreignObjectList[0].add( + SVG(``), + SVG( + '' + ) + ) + for (const v of document.getElementsByTagName('style')) { + foreignObjectList[0].add(SVG(v.outerHTML)) + } svgIsChange = true } // 如果还开启了数学公式,还要插入katex库的样式