Files
react-native/website/versioned_docs/version-0.48/autogen_Clipboard.md
T
2017-10-04 17:02:20 -07:00

2.3 KiB

id, title, category, permalink, original_id
id title category permalink original_id
version-0.48-clipboard Clipboard APIs docs/clipboard.html 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.