Add docs
This commit is contained in:
parent
03fdc7aa28
commit
44840ab6cc
1 changed files with 16 additions and 1 deletions
|
@ -157,6 +157,14 @@ Returns `String` - Reads `format` type from the clipboard.
|
||||||
|
|
||||||
Returns `Buffer` - Reads `format` type from the clipboard.
|
Returns `Buffer` - Reads `format` type from the clipboard.
|
||||||
|
|
||||||
|
### `clipboard.writeBuffer(format, buffer[, type])`
|
||||||
|
|
||||||
|
* `format` String
|
||||||
|
* `buffer` Buffer
|
||||||
|
* `type` String (optional)
|
||||||
|
|
||||||
|
Writes the `buffer` as `format` into the clipboard.
|
||||||
|
|
||||||
### `clipboard.write(data[, type])`
|
### `clipboard.write(data[, type])`
|
||||||
|
|
||||||
* `data` Object
|
* `data` Object
|
||||||
|
@ -165,10 +173,17 @@ Returns `Buffer` - Reads `format` type from the clipboard.
|
||||||
* `image` [NativeImage](native-image.md) (optional)
|
* `image` [NativeImage](native-image.md) (optional)
|
||||||
* `rtf` String (optional)
|
* `rtf` String (optional)
|
||||||
* `bookmark` String (optional) - The title of the url at `text`.
|
* `bookmark` String (optional) - The title of the url at `text`.
|
||||||
|
* `buffer` {[format: String]: Buffer} (optional) - The buffers for each format you want to write
|
||||||
* `type` String (optional)
|
* `type` String (optional)
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const {clipboard} = require('electron')
|
const {clipboard} = require('electron')
|
||||||
clipboard.write({text: 'test', html: '<b>test</b>'})
|
clipboard.write({
|
||||||
|
text: 'test',
|
||||||
|
html: '<b>test</b>',
|
||||||
|
buffer: {
|
||||||
|
'com.adobe.pdf': pdfData
|
||||||
|
}
|
||||||
|
})
|
||||||
```
|
```
|
||||||
Writes `data` to the clipboard.
|
Writes `data` to the clipboard.
|
||||||
|
|
Loading…
Add table
Reference in a new issue