UNPKG

@microsoft/teams-js

Version:

Microsoft Client SDK for building app for Microsoft hosts

36 lines (35 loc) 1.34 kB
/** * Interact with the system clipboard * * @beta * @module */ /** * Function to copy data to clipboard. * @remarks * Note: clipboard.write only supports Text, HTML, PNG, and JPEG data format. * MIME type for Text -> `text/plain`, HTML -> `text/html`, PNG/JPEG -> `image/(png | jpeg)` * Also, JPEG will be converted to PNG image when copying to clipboard. * * @param blob - A Blob object representing the data to be copied to clipboard. * @returns A string promise which resolves to success message from the clipboard or * rejects with error stating the reason for failure. */ export declare function write(blob: Blob): Promise<void>; /** * Function to read data from clipboard. * * @returns A promise blob which resolves to the data read from the clipboard or * rejects stating the reason for failure. * Note: Returned blob type will contain one of the MIME type `image/png`, `text/plain` or `text/html`. */ export declare function read(): Promise<Blob>; /** * Checks if clipboard capability is supported by the host * @returns boolean to represent whether the clipboard capability is supported * * @throws Error if {@linkcode app.initialize} has not successfully completed * * @beta */ export declare function isSupported(): boolean;