1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- export interface ClipboardPlugin {
- /**
- * Write a value to the clipboard (the "copy" action)
- *
- * @since 1.0.0
- */
- write(options: WriteOptions): Promise<void>;
- /**
- * Read a value from the clipboard (the "paste" action)
- *
- * @since 1.0.0
- */
- read(): Promise<ReadResult>;
- }
- /**
- * Represents the data to be written to the clipboard.
- *
- * @since 1.0.0
- */
- export interface WriteOptions {
- /**
- * Text value to copy.
- *
- * @since 1.0.0
- */
- string?: string;
- /**
- * Image in [Data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) format to copy.
- *
- * @since 1.0.0
- */
- image?: string;
- /**
- * URL string to copy.
- *
- * @since 1.0.0
- */
- url?: string;
- /**
- * User visible label to accompany the copied data (Android Only).
- *
- * @since 1.0.0
- */
- label?: string;
- }
- /**
- * Represents the data read from the clipboard.
- *
- * @since 1.0.0
- */
- export interface ReadResult {
- /**
- * Data read from the clipboard.
- *
- * @since 1.0.0
- */
- value: string;
- /**
- * Type of data in the clipboard.
- *
- * @since 1.0.0
- */
- type: string;
- }
- /**
- * @deprecated Use `WriteOptions`.
- * @since 1.0.0
- */
- export declare type ClipboardWrite = WriteOptions;
- /**
- * @deprecated Use `ReadResult`.
- * @since 1.0.0
- */
- export declare type ClipboardReadResult = ReadResult;
|