mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
clipboard: api to write multiple formats to same writer
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user