mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
2.8 KiB
2.8 KiB
id, title, original_id
| id | title | original_id |
|---|---|---|
| version-0.49-clipboard | clipboard | clipboard |
Clipboard #
Clipboard gives you an interface for setting and getting content from Clipboard on both iOS and Android
Methods #
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();
}
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.
Improve this page by sending a pull request!