clipboard: api to write multiple formats to same writer

This commit is contained in:
Robo 2015-07-07 10:47:33 +05:30
parent d661099322
commit 2d3e938a7f
3 changed files with 61 additions and 1 deletions

View file

@ -88,3 +88,17 @@ console.log(clipboard.has('<p>selection</p>'));
Reads the `data` in clipboard.
**Note:** This API is experimental and could be removed in future.
## clipboard.write(data[, type])
* `data` Object
* `text` String
* `html` String
* `image` [NativeImage](native-image.md)
* `type` String
```javascript
var clipboard = require('clipboard');
clipboard.write({text: 'test', html: "<b>test</b>"});
```
Writes the `data` iinto clipboard.