Save part of screen as image to share

I want to save a portion of my screen as an image, and then share that image. Right now, I’m getting stuck on being able to capture part of my screen. So, it would be a little different than a screenshot of the entire phone, because it is just one section of the app I am interested in.

Most of the javascript examples I can find out there copy the html elements and put them into a inside of an object which is then in a canvas. If I add that to my screen, then it displays great, just like a “screenshot” of only the portion of the app I want. Good so far. Now, the second part of the javascript examples use the canvas methods such as toDataUrl() to export the canvas contents to an image. This is where a browser security error comes in (has to do with the canvas being “tainted” because the svg is not CORS approved, so the browser doesn’t allow exporting methods after it has been tainted). So, this is where I get hung up with this approach.

I wondered if there are totally different approaches anyone else has tried? Any plugins that take a screenshot of only a portion of the screen? Or taking a screen shot, and then cropping the screenshot?

I would think I am not the only one wanting to do this, so maybe someone has already tried this? Also, I know this is not a problem explicitly to do with ionic framework… but maybe someone has done it before, or in the future it can be made easier with ionic :slight_smile: