1.0.2 • Published 8 years ago
danielsogl-cordova-plugin-clipboard v1.0.2
Clipboard
Clipboard management plugin for Cordova/PhoneGap that supports iOS, Android, Windows, and Windows Phone 8.
Usage
Install the plugin using the CLI, for instance with PhoneGap:
phonegap local plugin add https://github.com/danielsogl/cordova-plugin-clipboardThe plugin creates the object cordova.plugins.clipboard with the methods copy(text, onSuccess, onError) and paste(onSuccess, onError).
Example:
var text = "Hello World!";
cordova.plugins.clipboard.copy(text);
cordova.plugins.clipboard.paste(function (text) { alert(text); });Notes
All platforms
- The plugin only works with text content.
Windows Phone
- The Windows Phone platform doesn't allow applications to read the content of the clipboard. Using the
pastemethod will return an error.
Android
- The minimum supported API Level is 11. Make sure that
minSdkVersionis larger or equal to 11 inAndroidManifest.xml.
Acknowledgements
This plugin was inspired by ClipboardManagerPlugin (Android) and ClipboardPlugin (iOS).