Skip to main content

Interface: Clipboard

The clipboard provides read and write access to the system's clipboard.

Methods

readText()

readText(): Promise< string >

Read the current clipboard contents as text.

Returns

Promise< string >

A Promise that resolves to a string.

Source

packages/extension-api/src/extension-api.d.ts:3633


writeText()

writeText(value): Promise< void >

Writes text into the clipboard.

Parameters

value: string

Returns

Promise< void >

A Promise that resolves when writing happened.

Source

packages/extension-api/src/extension-api.d.ts:3639