DEV Community

Trinmar Boado
Trinmar Boado

Posted on

Prints a specific area/element of your html page for any frontend framework

Welcome to ink-html!


Prints a specific area/element of your html page for any frontend framework

  • [x] Form Input Values
  • [x] CSS @media print
  • [x] Popup Options

Installation

npm install ink-html
Enter fullscreen mode Exit fullscreen mode

or

yarn add ink-html
Enter fullscreen mode Exit fullscreen mode

CDN

  <script src="https://unpkg.com/ink-html/dist/index.js"></script>
Enter fullscreen mode Exit fullscreen mode

Usage

import print from 'ink-html'
// const print = inkHtml // for CDN

// js
print(window.querySelector('#printable'))
// Vue.js
print(this.$refs.printable.$el)
Enter fullscreen mode Exit fullscreen mode

Join and support our Community

Web and Mobile Developers PH

[ Facebook Page | Group ]

Join and support our Community
Web and Mobile Developers PH
[ Facebook Page | Group ]

Top comments (0)