ClipboardManager
10/22/22Less than 1 minute
clip_manager Clipboard manager instance.
Used to read, set, and listen to the system clipboard.
Import it via const { clipboardManager } = require("clip_manager").
Table of contents
Methods
Methods
clearClip
clearClip(): void
Remove the content of the clipboard.
getClip
getClip(): string | null
Get the current clipboard text. Returns null if the clipboard is empty.
hasClip
hasClip(): boolean
Whether the clipboard currently has text.
on
on(event: "clip_changed", listener: () => void): ClipboardManager
Listen for clipboard change events.
setClip
setClip(text: string): void
Set the content of the clipboard.
