Browse topics
Build an Applet Overview Quick Start Manifest Reference Method Architecture Entities & Storage Skills Agent Tools Permissions & Scopes CLI Testing
SDK Primitives Overview HTTP OAuth WebSocket Relay Database (SQLite) Key-Value Content Cache Project Filesystem Credentials Events Cron / Scheduler Feed Parsing
RobinPath Overview
Clipboard API
Read text from and write text to the system clipboard.
The ctx.sdk.clipboard surface reads text from and writes text to the system clipboard.
Scope required: clipboard:read (read) and clipboard:write (write)
Usage
Call ctx.sdk.clipboard inside a method’s run body:
import { defineMethod } from "@rightplace/applet-sdk/v2";
export default defineMethod({
async run(_params, ctx) {
const text = await ctx.sdk.clipboard.read();
await ctx.sdk.clipboard.write("https://example.com");
},
});
read resolves to the current clipboard text. write takes a single string and replaces the clipboard contents.
Notes
- Declare
clipboard:readforreadandclipboard:writeforwriteinapplet.json::scopes[]. Each call needs its matching scope. - Both operations handle text only.
- Both return a
Promise; await before the method returns.