Begin adding documentation

This commit is contained in:
Niklas von Hertzen
2017-12-07 23:49:40 +08:00
parent 1d1c74a74e
commit 63377d47a4
5 changed files with 166 additions and 0 deletions

25
docs/getting-started.md Normal file
View File

@@ -0,0 +1,25 @@
---
title: "Getting Started"
---
# Installing
You can install `html2canvas` through npm or [download a built release](https://github.com/niklasvh/html2canvas/releases).
### npm
npm install html2canvas
```javascript
import html2canvas from 'html2canvas';
```
# Usage
To render an `element` with html2canvas with some (optional) [options](/configuration/), simply call `html2canvas(element, options);`
```javascript
html2canvas(document.body).then(function(canvas) {
document.body.appendChild(canvas);
});
```