mirror of
https://github.com/status-im/react-native.git
synced 2025-01-17 04:50:59 +00:00
e11d496e9d
Summary: Follow up to 9ec95673909beac7798f589e0e9821b4225f8fa9 Closes https://github.com/facebook/react-native/pull/16759 Differential Revision: D6285219 Pulled By: hramos fbshipit-source-id: 7012d257a5a6cff06cb2d94203a9379e4b7e3c4e
1.0 KiB
1.0 KiB
id | title | layout | category | permalink | next | previous |
---|---|---|---|---|---|---|
clipboard | Clipboard | docs | APIs | docs/clipboard.html | datepickerandroid | cameraroll |
Clipboard
gives you an interface for setting and getting content from Clipboard on both iOS and Android
Methods
Reference
Methods
getString()
Clipboard.getString()
Get content of string type, this method returns a Promise
, so you can use following code to get clipboard content
async _getContent() {
var content = await Clipboard.getString();
}
setString()
Clipboard.setString(content)
Set content of string type. You can use following code to set clipboard content:
_setContent() {
Clipboard.setString('hello world');
}
Parameters:
Name | Type | Required | Description |
---|---|---|---|
content | string | yes | The content to be stored in the clipboard. |