Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29758

How to send screenshot of a particular div onclick of share icon in a body using angular8

$
0
0

i have a profile details, onclick of share button, mail has to open without having mailid to whom it should be shared, with the body containing screenshot of the profile details on which the share button is added, so in mail, the visible part of the screen must be shared as image.

DEMO: DEMO

TS: mailOpen() {

    window.open('mailto:your_mail@example.com?subject=subject&body=body');

    let printContent = document.getElementById('printProfileList');
    let documentClone = $("html").clone();
    let printContainer = "printwrap";
    documentClone[0].getElementsByTagName('body')[0].innerHTML = "<div id='" + printContainer + "'>" + printContent.innerHTML + "</div>";
    let WinPrint = window.open('', '', 'left=300,top=0,width=1000,height=700,toolbar=0,scrollbars=0,status=0');
    WinPrint.document.write(documentClone.html());
    WinPrint.document.close();

    setTimeout(() => {

      WinPrint.close();
    }, 1000);

  }

Viewing all articles
Browse latest Browse all 29758

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>