Skip to content

ChangJoo-Park/nuxt-html2canvas-proxy

Repository files navigation

nuxt-html2canvas-proxy

html2canvas proxy using html2canvas-proxy-nodejs.

npm version License

Nuxt module for html2canvas proxy

It doesn't have html2canvas, Please install html2canvas in your project.

📖 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

About

Nuxt module for html2canvas-proxy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published