README
nuxt-html2canvas-proxy
html2canvas proxy using html2canvas-proxy-nodejs.
Nuxt module for html2canvas proxy
Setup
- Add
nuxt-html2canvas-proxy
dependency to your project
yarn add nuxt-html2canvas-proxy # or npm install nuxt-html2canvas-proxy
- Add
nuxt-html2canvas-proxy
to themodules
section ofnuxt.config.js
{
modules: [
// Simple usage
'nuxt-html2canvas-proxy', /* default path is /_proxy */
// With options
['nuxt-html2canvas-proxy', { path: '/_proxy' /* change path for html2canvas proxy */ }]
],
}
- Use with html2canvas
html2canvas(document.querySelector('#image'), { useCORS: false, proxy: '/_proxy' })
.then((canvas) => {
document.body.appendChild(canvas)
})
Development
- Clone this repository
- Install dependencies using
yarn install
ornpm install
- Start development server using
npm run dev
License
Copyright (c) ChangJoo Park