Workspace.on('receive-text-menu') method
Workspace › on(‘receive-text-menu’)
Unofficial
Triggered when user shares text on mobile.Signature:
on(name: "receive-text-menu", callback: (menu: Menu, text: string) => void, ctx?: unknown): EventRefParameters:
| Parameter | Type | Description |
|---|---|---|
| name | "receive-text-menu" | Should be 'receive-text-menu'. |
| callback | (menu: Menu, text: string) => void | The callback function. |
| ctx? | unknown | The context passed as this to the callback function. |
Returns: EventRef — The event reference.
Example:
app.workspace.on('receive-text-menu', (menu, text) => { console.log(menu, text);});