Workspace.on('receive-files-menu') method
Workspace › on(‘receive-files-menu’)
Unofficial
Triggered when user shares files on mobile.Signature:
on(name: "receive-files-menu", callback: (menu: Menu, files: TFile[]) => void, ctx?: unknown): EventRefParameters:
| Parameter | Type | Description |
|---|---|---|
| name | "receive-files-menu" | Should be 'receive-files-menu'. |
| callback | (menu: Menu, files: TFile[]) => 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-files-menu', (menu, files) => { console.log(menu, files);});