UNPKG

ionic-native

Version:

Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support

40 lines (39 loc) 1.12 kB
/** * @name Clipboard * @description * 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](https://github.com/VersoSolutions/CordovaClipboard.git). * * @usage * ```typescript * import { Clipboard } from 'ionic-native'; * * * Clipboard.copy('Hello world'); * * Clipboard.paste().then( * (resolve: string) => { * alert(resolve); * }, * (reject: string) => { * alert('Error: ' + reject); * } * ); * ); * ``` */ export declare class Clipboard { /** * Copies the given text * @param {string} text Text that gets copied on the system clipboard * @returns {Promise<any>} Returns a promise after the text has been copied */ static copy(text: string): Promise<any>; /** * Pastes the text stored in clipboard * @returns {Promise<any>} Returns a promise after the text has been pasted */ static paste(): Promise<any>; }