0.1.5 • Published 5 years ago

dom-imagify v0.1.5

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

dom-imagify

fork from dom-to-image

Install

npm install --save dom-imagify

Usage

import {toPng} from "dom-imagify"

const extraStyles = `
@font-face {
    font-family: Roboto;
    src: url(//xxx.xxx.com/roboto-thin.eot);
    font-weight: 200
}
`

toPng(document.body,{
    extraStyles
})
.then(function (dataUrl) {
    var link = document.createElement('a');
    link.download = new Date().getTime()+'.png';
    link.href = dataUrl;
    link.click();
})
0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

6 years ago