I want to capture a part of the screen to an image. I’ve read the posts here, looked at examples, videos and code, but my knowledge of HTML and JavaScript is to shallow. So, I don’t understand why this code is not working when I put it in a HTML element:
I played around with this previously. I would urge you to use the ID of a group instead of body. Group all elements you want to fetch within a group with a unique “div id”, and reference this in the html2canvas script.
If you need it for capturing a part of the screen like the OP then the Documental plugin will help you out. It has a snapshot element that can let you take a snapshot of any element by its ID.