Closed laurensgeerts closed 1 year ago
The most obvious question is: What is the content of the generated file? :)
PS: You can get the svg content by calling svg()
on the root svg instead of using outerHTML
The most obvious question is: What is the content of the generated file? :)
PS: You can get the svg content by calling
svg()
on the root svg instead of using outerHTML
Thanks for the tip! I've changed it :) What do you mean exactly by content? I've drawn 4 shapes which each get a fill of choice by the user (consisting out of an external SVG image).
What is the underlying svg code?
So I've made a little generator where you can manipulate 4 different shapes. Now I wanted to add the feature so you can add an SVG pattern (that is made in illustrator) to one of the 4 shapes. So I've created a little pattern that repeats the SVG image. It seems to work in browser but once I export it, the SVG image from the pattern gets lost. Is there a way I can export the SVG image along with the exported SVG file? Now I have to add the pattern afterwards in illustrator.
My pattern looks like this (the white squares should be the SVG file):
But the export looks like this:
This is my export code (if that helps), output1 is the ID of my canvas:
If more info is needed let me know! Thanks in advance!
Edit: this is the result I got when I try it with a png (which would be alright as well but I prefer using SVG):