restore clipboard.has api and fix docs

This commit is contained in:
deepak1556 2015-05-27 13:35:51 +05:30
parent 5584e3fd49
commit 4d56281972
3 changed files with 25 additions and 3 deletions

View file

@ -66,11 +66,25 @@ Clears everything in clipboard.
Returns an array of supported `format` for the clipboard `type`.
## clipboard.read(format[, type])
## clipboard.has(data[, type])
* `format` String
* `data` String
* `type` String
Reads the data in clipboard of the `format`.
Returns whether clipboard supports the format of specified `data`.
```javascript
var clipboard = require('clipboard');
console.log(clipboard.has('<p>selection</p>'));
```
**Note:** This API is experimental and could be removed in future.
## clipboard.read(data[, type])
* `data` String
* `type` String
Reads the `data` in clipboard.
**Note:** This API is experimental and could be removed in future.