print-any-html

0.1.0 • Public • Published

print-any-html

Let the browser print any HTML string.

npm version build status dependency status dev dependency status ISC-licensed

Installing

Use the bundle from build/print-any-html.min.js or install using npm.

npm install print-any-html

Usage

print(html, [callback], [delay])

delay is 20 ms by default.

const print = require('print-any-html')
 
const html = `
    <!doctype html>
    <html>
    <head>
        <meta charset="utf-8"/>
        <style>
            p { text-transform: uppercase; }
        </style>
    </head>
    <body>
        <p>Hello World.</p>
    </body>
    </html>
`
 
print(html, () => {
    console.info('user has printed or aborted')
})

Contributing

If you have a question, found a bug or want to propose a feature, have a look at the issues page.

Package Sidebar

Install

npm i print-any-html

Weekly Downloads

66

Version

0.1.0

License

ISC

Last publish

Collaborators

  • derhuerst