Skip to main content
Version: v2.9.0


This part of the runtime provides access to the operating system's clipboard.
The current implementation only handles text.


This method reads the currently stored text from the clipboard.

Go: ClipboardGetText(ctx context.Context) (string, error)
Returns: a string (if the clipboard is empty an empty string will be returned) or an error.

JS: ClipboardGetText(): Promise<string>
Returns: a promise with a string result (if the clipboard is empty an empty string will be returned).


This method writes a text to the clipboard.

Go: ClipboardSetText(ctx context.Context, text string) error
Returns: an error if there is any.

JS: ClipboardSetText(text: string): Promise<boolean>
Returns: a promise with true result if the text was successfully set on the clipboard, false otherwise.