From 8c79ffd723fe4523ca0ea3e0aaae30b91e68b6d0 Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Tue, 25 Jul 2023 09:38:50 +0800 Subject: [PATCH] =?UTF-8?q?Feat=EF=BC=9A=E5=AF=BC=E5=87=BAsvg=E6=97=B6?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2svg=E4=B8=AD=E5=AD=98=E5=9C=A8=E7=9A=84 ?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=EF=BC=8C=E9=98=B2=E6=AD=A2=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E7=9A=84svg=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/src/plugins/Export.js | 4 +++- simple-mind-map/src/utils/index.js | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/simple-mind-map/src/plugins/Export.js b/simple-mind-map/src/plugins/Export.js index 1f719d8f..626f73c7 100644 --- a/simple-mind-map/src/plugins/Export.js +++ b/simple-mind-map/src/plugins/Export.js @@ -1,4 +1,4 @@ -import { imgToDataUrl, downloadFile, readBlob } from '../utils' +import { imgToDataUrl, downloadFile, readBlob, removeHTMLEntities } from '../utils' import { SVG } from '@svgdotjs/svg.js' import drawBackgroundImageToCanvas from '../utils/simulateCSSBackgroundInCanvas' import { transformToMarkdown } from '../parse/toMarkdown' @@ -154,6 +154,7 @@ class Export { */ async png(name, transparent = false) { let { node, str } = await this.getSvgData() + str = removeHTMLEntities(str) // 如果开启了富文本,则使用htmltocanvas转换为图片 if (this.mindMap.richText) { let res = await this.mindMap.richText.handleExportPng(node.node) @@ -207,6 +208,7 @@ class Export { node.first().before(SVG(`