mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	fix(mermaid): bring back export as SVG
This commit is contained in:
		| @@ -1,5 +1,7 @@ | |||||||
|  | import type { EventData } from "../../components/app_context.js"; | ||||||
| import type FNote from "../../entities/fnote.js"; | import type FNote from "../../entities/fnote.js"; | ||||||
| import server from "../../services/server.js"; | import server from "../../services/server.js"; | ||||||
|  | import utils from "../../services/utils.js"; | ||||||
| import AbstractSplitTypeWidget from "./abstract_split_type_widget.js"; | import AbstractSplitTypeWidget from "./abstract_split_type_widget.js"; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -159,4 +161,12 @@ export default abstract class AbstractSvgSplitTypeWidget extends AbstractSplitTy | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     async exportSvgEvent({ ntxId }: EventData<"exportSvg">) { | ||||||
|  |         if (!this.isNoteContext(ntxId) || this.note?.type !== "mermaid" || !this.svg) { | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         utils.downloadSvg(this.note.title, this.svg); | ||||||
|  |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user