Open davidbau opened 9 years ago
(Related to recently-closed bug #183)
A quick Google search yields https://github.com/gabelerner/canvg. It seems to transfer the rendering to JavaScript to bypass the cross-domain restriction.
Yes, but here's something simpler: I suspect if we use an inline
Note that html2canvas already includes svg rendering logic - a different implementation than canvg I believe. But it doesn't know how to get around an svg data-url.
On Wed, Aug 5, 2015 at 9:44 AM, Weihang Fan notifications@github.com wrote:
A quick Google search yields https://github.com/gabelerner/canvg. It seems to transfer the rendering to JavaScript to bypass the cross-domain restriction.
— Reply to this email directly or view it on GitHub https://github.com/PencilCode/pencilcode/issues/186#issuecomment-128000267 .
Darn. I misunderstood and thought it was already an inline svg, and was confused as to why the browser rejected it...
I could try to play around the svg version of html2canvas
to see how it goes.
Assigning to @xinan - feel free to bounce it back if you don't have time.
It seems that
data:image/svg...
image URLS are counted as tainted by the browsers (since it may hide url references within the svg), which means we can not screenshot SVG preview.We should see if it is possible to preview an .svg file in a different way that can be screenshot.