clipboard
Read and write the system clipboard.
ts
import { copy, paste } from "std::clipboard"
node main() {
copy("hello")
const text = paste()
}Effects
std::clipboardCopy
ts
effect std::clipboardCopy {}(source)
std::clipboardPaste
ts
effect std::clipboardPaste {}(source)
Functions
copy
ts
copy(text: string)Copy text to the system clipboard.
@param text - The text to copy
Parameters:
| Name | Type | Default |
|---|---|---|
| text | string |
Throws: std::clipboardCopy
(source)
paste
ts
paste(): stringRead text from the system clipboard and return it.
Returns: string
Throws: std::clipboardPaste
(source)