You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Its an app for working with the ancient Chinese book of philosophy called the I Ching. The UI allows users to enter specific numbers that correlate with shapes that may be looked up in the book. I dynamically generate these shapes as SVG for display in the browser. However, I also want to allow users to download the SVG shapes to do whatever they’d like with (I use this feature myself for journaling purposes.) I currently use ports to accomplish this, but it’d be nice if I could keep everything in Elm by using elm/file's download function. The only missing piece of the puzzle appears to be the lack of ability to serialize SVG nodes.
This is admittedly a pretty niche use case, although it isn’t too much of a stretch to imagine someone building some sort of vector image editor/creator, and wanting to allow users to download the SVG content they’ve created in the browser, which is what I thought the example from the elm/file documentation was describing, at least until I looked harder at the type signatures.
The text was updated successfully, but these errors were encountered:
bstro
changed the title
Serializing SVG?
Serializing SVG
Nov 21, 2018
I'm looking for a way to serialize SVG. Related to elm/file#1
The app I’m using this for is pretty niche, so a lot of this might not make sense, but I’ll give it a go:
You can take a look at an early, in progress version at http://hexagra.ms/678978
Its an app for working with the ancient Chinese book of philosophy called the I Ching. The UI allows users to enter specific numbers that correlate with shapes that may be looked up in the book. I dynamically generate these shapes as SVG for display in the browser. However, I also want to allow users to download the SVG shapes to do whatever they’d like with (I use this feature myself for journaling purposes.) I currently use ports to accomplish this, but it’d be nice if I could keep everything in Elm by using
elm/file
'sdownload
function. The only missing piece of the puzzle appears to be the lack of ability to serialize SVG nodes.This is admittedly a pretty niche use case, although it isn’t too much of a stretch to imagine someone building some sort of vector image editor/creator, and wanting to allow users to download the SVG content they’ve created in the browser, which is what I thought the example from the
elm/file
documentation was describing, at least until I looked harder at the type signatures.The text was updated successfully, but these errors were encountered: