Open alixander opened 1 year ago
for what purpose?
my idea is
https://play.d2lang.com/?l=&script=qlDQtVOo5AIEAAD__w%3D%3D& Export=SVG
foobar.d2
xy{
icon:https://play.d2lang.com/?l=&script=qlDQtVOo5AIEAAD__w%3D%3D&Export=SVG
}
@bo-ku-ra it's kind of hidden right now, but you can do this:
https://api.d2lang.com/render/svg?script=SspX0NVVyC4FkUWJXIAAAAD__w==&layout=dagre&theme=7&sketch=1
Sorry to revive this topic, but If anyone is interested, the content you see in the script
parameter in the URL of the playground is just the diagram code after being compressed with Deflate and than base64url encoded.
Please note that it uses base64url (eg: /
is converted to _
and =
to %3d
) and not plain base64. 😉
What if this command just encoded the input.d2 file and opened it up on playground?