Documentation Index
Fetch the complete documentation index at: https://docs.simular.ai/llms.txt
Use this file to discover all available pages before exploring further.
Class: Clipboard
Defined in: index.d.ts:285 Contains functions to read and write the clipboard.Constructors
Constructor
new Clipboard(): Clipboard
Defined in: index.d.ts:286
Returns
Clipboard
Methods
clear()
clear(): void
Defined in: index.d.ts:321
Clears all content from the clipboard, regardless of type.
Returns
void
getImage()
getImage():Defined in: index.d.ts:300 Gets the image content from the clipboard. Returns the clipboard image if available, orImage|null
null if the
clipboard doesn’t contain image data.
Returns
Image | null
getString()
getString():Defined in: index.d.ts:293 Gets the string content from the clipboard. Returns the clipboard string if available, orstring|null
null if the
clipboard doesn’t contain string data or is empty.
Returns
string | null
pasteText()
pasteText(Defined in: index.d.ts:332 Types text by pasting it from the clipboard. Saves the previous clipboard text and image (when present), sets the clipboard to the specified string, verifies it was set correctly, then simulates Command+V (or Ctrl+V) to paste it. After pasting, reapplies the saved snapshot (image is restored in preference to text when both were present). Other clipboard formats are not saved or restored.value):void
Parameters
value
string
Returns
void
setImage()
setImage(Defined in: index.d.ts:319 Replaces the contents of the clipboard with the given image. For example used to copy a screenshot to the clipboard. Returns the previous string content, orimage):string|null
null if the clipboard
was empty or had no string data. The clipboard is not
automatically restored; the caller can use the returned value to
restore it if desired.
Parameters
image
Image
Returns
string | null
setString()
setString(Defined in: index.d.ts:309 Replaces the contents of the clipboard with the given string. Returns the previous string content, orvalue):string|null
null if the clipboard
was empty or had no string data. The clipboard is not
automatically restored; the caller can use the returned value to
restore it if desired.
Parameters
value
string
Returns
string | null
