Closed damonsk closed 9 months ago
Also, SVG would be nice. 🤓 I am new to VS Code Extensions and wonder if this could be a good exercise to dive into it.
My thoughts on how this could be achieved..
We have html2canvas which would generate the PNG.
For SVG it would be the same process but getting the svg markup from the map.
This example shows how to save a file - https://github.com/microsoft/vscode-extension-samples/blob/94c1b179c75242072e69fff8199d08e2e5ff4335/fsconsumer-sample/src/extension.ts#L71 to write the file.
Another way would be to create a new file tab, and set the text to be that of the svg (which is just xml) and allow the user to save via VSCode.
https://code.visualstudio.com/api/references/vscode-api#WorkspaceEdit - createFile.
Originally posted by @jaxley in https://github.com/damonsk/onlinewardleymaps/issues/71#issuecomment-925044179