d2 icon indicating copy to clipboard operation
d2 copied to clipboard

embed D2 script as metadata in SVG and PNG exports

Open alixander opened this issue 2 years ago • 4 comments

we can encode it in, and then editors can decode it and do cool stuff like https://github.com/terrastruct/d2-vscode/issues/26

alixander avatar Jan 19 '23 17:01 alixander

@alixander this would be wonderful! Is there a best-practice way for embedding code inside SVG? Add as a structured comment?

amitkot avatar Jan 30 '24 15:01 amitkot