html-to-image icon indicating copy to clipboard operation
html-to-image copied to clipboard

Not considering the node generated with DOMParser

Open Urvi099 opened this issue 3 years ago • 2 comments
trafficstars

I'm creating the html from the string. And i do this with the help of the domparser. Now i pass the body of the parser object to htmltopng but its not creating the empty image base64.

You can check from the below link : https://codesandbox.io/s/string-parse-html-image-640lj9

Urvi099 avatar Aug 04 '22 12:08 Urvi099

👋 @Urvi099

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

biiibooo[bot] avatar Aug 04 '22 12:08 biiibooo[bot]

@Urvi099 Since your code is inside of a DOM parser, it does not have the right context. You can take the element in question, insert it into the document tree.

bubkoo avatar Aug 16 '22 03:08 bubkoo