nuxt-html2canvas-proxy

Nuxt module for html2canvas proxy

Usage no npm install needed!

<script type="module">
  import nuxtHtml2canvasProxy from 'https://cdn.skypack.dev/nuxt-html2canvas-proxy';
</script>

README

nuxt-html2canvas-proxy

html2canvas proxy using html2canvas-proxy-nodejs.

npm version npm downloads Github Actions CI Codecov License

Nuxt module for html2canvas proxy

📖 Release Notes

Setup

  1. Add nuxt-html2canvas-proxy dependency to your project
yarn add nuxt-html2canvas-proxy # or npm install nuxt-html2canvas-proxy
  1. Add nuxt-html2canvas-proxy to the modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    'nuxt-html2canvas-proxy', /* default path is /_proxy */

    // With options
    ['nuxt-html2canvas-proxy', { path: '/_proxy' /* change path for html2canvas proxy */ }]
  ],
}
  1. Use with html2canvas
html2canvas(document.querySelector('#image'), { useCORS: false, proxy: '/_proxy' })
  .then((canvas) => {
    document.body.appendChild(canvas)
  })

Development

  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using npm run dev

License

MIT License

Copyright (c) ChangJoo Park