1.1.1 • Published 3 years ago

print-mini-html v1.1.1

Weekly downloads
11
License
MIT
Repository
github
Last release
3 years ago

printHTML

A plugin for printing partial pages

Usage

You will need Node.js installed on your system.

npm install --save print-mini-html
import printHTML from 'print-mini-html';

printHTML(document.body.cloneNode(true));

printHTML('<div>print</div>');

printHTML('<div class="red">print</div>', 'title', '.red{color:red;}');

Or manually download and link printHTML.js in your HTML, It can also be downloaded via UNPKG:

<script src="https://unpkg.com/print-mini-html@1.1.1/dist/index.js"></script>
<script type="text/javascript">
printHTML('<div class="red">print</div>', 'title', '.red{color:red;}')
</script>

arguments

printHTML(html, title, cssText, delay, callback);
field nametypemustdescription
htmlHTMLElement | DOMStringtrueDOM to print
titleDOMStringfalseDefault document.title
cssTextDOMStringfalseadd styles
delayNumberfalsedelay print
callbackFunctionfalseprint callback

return

function force print
1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago