mirror of
https://github.com/status-im/react-native.git
synced 2025-01-17 13:01:13 +00:00
9ec9567390
Differential Revision: D6261799 fbshipit-source-id: 269e151c5d136c1d508d9f2a060c0c670d0fe0f2
936 B
936 B
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()
static 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()
static setString(content)
Set content of string type. You can use following code to set clipboard content
_setContent() {
Clipboard.setString('hello world');
}
@param the content to be stored in the clipboard.