Loading svg's

I’m attempting to load an svg file stored in the plugin folder. Is there a way to interpret the svg data as a path object, or will i have to parse it as text? Thanks.

You’ll need to parse it. For SVG paths, the syntax in XD is the same (for path objects), but other elements will need some handling on your end. That said, there may be some npm packages you could use to get most of the way.

1 Like

https://github.com/elrumordelaluz/element-to-path looks like it might work. No experience with it, though.

I’m just copying the code to the clipboard. That way, the user can paste it wherever they want