TriliumNext / Notes

Build your personal knowledge base with TriliumNext Notes
https://triliumnext.github.io/Docs/
GNU Affero General Public License v3.0
901 stars 49 forks source link

(Feature request) Allow for PNG export of diagrams (Mermaid / Mindmap) #536

Open perfectra1n opened 3 hours ago

perfectra1n commented 3 hours ago

Describe feature

Currently we only allow for svg which become really unfun to work with when needing to upload them to places that only accept formats like jpeg and png, when most Mermaid diagram editors already allow you to export as png.

Additional Information

No response

perfectra1n commented 2 hours ago

@eliandoran I would love to add additional support for exporting to PNG for Mermaid diagrams and mindmaps, what do you think is the best user experience for it?

Currently when using Trilium via a browser and hitting the "export", a download immediately starts for it as an svg. However when using the desktop app, you get the choice of where to download it to, and what format to download it in (svg or "all formats").

Should we add another button for PNG exports, or should we present some modal when the user clicks on export prompting them for the format they would like it in, or what do you think is the best UX/UI way of going about it?

eliandoran commented 1 hour ago

@perfectra1n , good question.

I think we need to redesign the export dialog for all the non-standard note types, but it would be outside the scope of this feature.

For me it's OK to add a new button for now, similar to the SVG export one. It would be very important to have a distinctive icon for the two buttons.

perfectra1n commented 43 minutes ago

I agree 100%. Okay, then I'll add just one more button for the diagrams then.