hediet / vscode-drawio

This unofficial extension integrates Draw.io (also known as diagrams.net) into VS Code.
https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio
GNU General Public License v3.0
9.02k stars 406 forks source link

automatic export #325

Closed onlygecko closed 1 year ago

onlygecko commented 1 year ago

Hi,

is there way to automatically export the diagram (to PNG, ...) when the diagram has been changed (and saved)?

Greetings, Peter

hediet commented 1 year ago

No. Shouldn't be impossible to implement though.

What should the feature be?

onlygecko commented 1 year ago

First of all thanks for the quick response. :-)

Scenario: I'm editing a diagram which I want to use in my markdown / Word / ... document. But as human being I am lazy, so it would be great if a png (or svg) version would be automatically generated with the same filename (but other suffix), when the original drawio diagram has been saved.

Maybe the vs code extension settings could be used to determine if diagrams should exported automatically and which type should be used.

What do You think - Is this a valid use case?

hediet commented 1 year ago

Did you know you can just rename your diagram to myDiagram.dio.svg? or myDiagram.dio.png? After you edit & save this file in VS Code, that file becomes both a diagram and image. I recommend SVG though.

onlygecko commented 1 year ago

He, this is an amazing tip! :star_struck: I did not know that and this even better. And I don't want to know what kind of magic is happening there - I just love it. :smiley: