rpdasilva / print-html-element Goto Github PK
View Code? Open in Web Editor NEWPrints the HTML of a provided element.
License: MIT License
Prints the HTML of a provided element.
License: MIT License
Hello,
I have been trying to use this plugin in a webpack managed package. The only problem i am facing is that the styles are not applying while printing. Because of the below code snippet in the plugin -
stylesheets = Array.prototype.slice.call( document.getElementsByTagName('link') );
It is explicitly looking for "link" elements and appending to the print html.
For webpack or browserify enabled packages the styles are embedded into the html with "<style>" tags. So i would be happy if i can set the option to pick "style" or "link" as per my needs...
Tested in Firefox 45.0.1.
PrintHTMLElement.printElement(document.getElementById('my-id'));
No print dialog, no error. No nothing.
This works though:
PrintHTMLElement.printElement(
document.getElementById('my-id'),
{ printMode: 'popup' }
);
I'm using React. But it works perfectly in Chrome so I'm guessing that's not the issue.
Any idea of how to fix this? Thanks!
Line 115
I don't know how else to describe it; It gets the whole page, but it also cuts off some elements for some reason.
Uncaught TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'.
When print with an HTML string, element.className is undefined adding an erroneous class name to wrapper div
Hello, I'm currently using print-html-element to print off certain "tickets" for my current React application. It works fine if I select single tickets, but my superiors want the function to print off multiple tickets. All these tickets are stored in their own div elements.
I know it's posted that it will be a feature implemented later, but is there a workaround you suggest?
Is there any way we can localize the header date while printing. I know a solution which is to do with changing chrome settings on the client machine.
But i am wondering can we do it through code by passing date just like the title?
Using the example pages, I cannot print any of the examples except the popup version. Tested on Chrome with Android 5.1, and Anroid 7.0.
They revert to printing the entire sources html instead of the target elements/html.
In addition to #16 I would like to ask if there would be the possibility to print each element to a new page?
when i print from IE11 i got a blank page.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.