react-native-pasteboard
v1.3.0
Published
Copy text to clipboard
Downloads
12
Maintainers
Readme
react-native-pasteboard
Copy text to your clipboard
Add it to your project
- Run
npm install react-native-pasteboard --save
- Open your project in XCode, right click on your project and click
Add Files to "Your Project Name"
- Add
RCTPasteBoard
from yournode_modules/react-native-orientation
folder. - Whenever you want to use it within React Native code now you can:
var PasteBoard = require('react-native-pasteboard');
Usage
PasteBoard.copyText('Hello world!' , (callback) => {
AlertIOS.alert('Alert', 'Link copied to clipboard!');
});
Functions
copyText(input, callback)
Callback is required.