Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

70
Views
Display/hide CSS when using HTML2Canvas

Is it possible to show hidden text on a html2canvas "screenshot"?

Let's say I have <p style="display:none;">Some random text</p>. Can this be hidden on the page as a default, but display when you press the button to download the div?

Also - is it possible to go the other way around aswell? Is it possible to hide CSS styles of an item instead of removing the entire item itself using the data-html2canvas-ignore? Let's say I have a code such as this one: <input style="border:solid; background:blue;">Display this input</input>. Is it possible to display the text of the input, but hide the style when using html2canvas?

     $( "#download" ).on( "click", function() {
      html2canvas(document.querySelector("#to_save")).then(canvas => {
        canvas.toBlob(function(blob) {
          window.saveAs(blob, 'Oversikt.png');
        });
        });
    });

7 months ago ยท Juan Pablo Isaza
Answer question
Find remote jobs