Clipboard
$ ionic plugin add https://github.com/VersoSolutions/CordovaClipboard.git
Repo: https://github.com/VersoSolutions/CordovaClipboard
Clipboard management plugin for Cordova that supports iOS, Android, and Windows Phone 8.
Requires Cordova plugin: https://github.com/VersoSolutions/CordovaClipboard For more info, please see the Clipboard plugin docs.
Supported platforms
- Amazon Fire OS
- iOS
- Android
- BlackBerry 10
- Windows Phone 7
- Windows Phone 8
- Windows
- Firefox OS
- Browser
Usage
import {Clipboard} from 'ionic-native';
Clipboard.copy("Hello world");
Clipboard.paste().then(
(resolve : string) => {
alert(resolve);
},
(reject : string) => {
alert("Error: " + reject);
}
);
);
Static Methods
copy(text)
Copies the given text
Param | Type | Details |
---|---|---|
text |
Returns:
Promise<T>
paste()
Pastes the text stored in clipboard
Returns:
Promise<T>