Skip to content

Function: copyText()

ts
function copyText(text): Promise<boolean>;

Copies a plain-text string to the clipboard.

Parameters

ParameterTypeDescription
textstringThe text to copy.

Returns

Promise<boolean>

true when the copy succeeded.

Example

ts
console.log(await copyText('Hello World'))

Since

1.0.0

Released under the MIT License.