clipboard
Interact with the system clipboard.
Functions
clipboard.read
clipboard.read(format: ClipboardContentType): Promise<string>;
Read the value of the clipboard. When the format is image
, it will return the Data URL of the image.
Example
clipboard.write
clipboard.write(format: ClipboardContentType, value: string): Promise<void>;
Write value to the clipboard. If the format is image
, the value must be the Data URL of the image.
clipboard.paste
clipboard.paste(value: string): Promise<void>;
Paste the value into the frontmost app.
Types
clipboard.ClipboardContentType
Content type of the clipboard.