LensStudio:Clipboard
ModuleModule providing clipboard read/write access for Lens Studio Editor.
Example
// The LensStudio:Clipboard module exports a `clipboard` object of type Clipboard.
// Clipboard has a read/write `text` property (string) for accessing the system clipboard.
const { clipboard } = await import('LensStudio:Clipboard');
// Read the current clipboard text
const previousText = clipboard.text;
console.log('Current clipboard text:', previousText);
// Write new text to the clipboard
clipboard.text = 'Hello from Lens Studio plugin!';
console.log('Set clipboard text to:', clipboard.text);
// Restore the previous clipboard content
clipboard.text = previousText;
console.log('Restored clipboard text to previous value');
Classes
| Class | Description |
|---|---|
| Clipboard | Represents the system clipboard, exposing methods to get and set clipboard content. |
Variables
| Variable | Description |
|---|---|
| clipboard | Global clipboard instance for the current Editor session. |