clipboard
Perform copy and paste operations on the system clipboard.
await eagle.clipboard.writeText('Example string');
console.log(await eagle.clipboard.readText());Methods
clear()
Clear the clipboard content.
eagle.clipboard.writeText('Example string');
eagle.clipboard.clear();
console.log(eagle.clipboard.readText()); // undefinedhas(format)
Check if the current clipboard content contains the specified format.
formatstring - Specified formatReturns boolean - Whether it contains the specified format
writeText(text)
Write text as plain text to the clipboard.
textstring - Text to be written
readText()
Get the plain text content of the current clipboard.
Returns string
writeBuffer(format, buffer)
Write buffer as format type to the clipboard.
formatstring - Clipboard formatbufferBuffer - Buffer format of the content to be written
readBuffer(format)
Read format type content from the clipboard.
Returns Buffer
writeImage(image)
Write image to the clipboard.
imageNativeImage - Image to be written to the clipboard
readImage()
Read image format content from the clipboard.
Returns NativeImage
writeHTML(markup)
Write markup as HTML format to the clipboard.
markupstring
readHTML()
Read HTML format content from the clipboard.
Returns string
copyFiles(paths)
Copy the specified files to the clipboard, supporting paste in file manager.
pathsstrings[] - Files to be copied to the clipboard.
Last updated