PluginContext
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
commands |
PluginCommands |
- |
editor |
EditorHandle |
The same handle the host has: open, save, getWorkbook, subscribe, status, origin… |
files |
PluginFiles |
- |
limits |
object |
The editor’s limits, so a source can refuse a file it won’t open before downloading it. |
limits.maxFileBytes |
number |
- |
signal |
AbortSignal |
Aborted when the editor is destroyed, or the plugin is stopped after failing; pass it to fetches and listeners. |
storage |
PluginStorage |
A small key–value store kept in this browser for this plugin: recent files, the last folder. |
ui |
PluginUI |
- |
Methods
Section titled “Methods”on(listener): () => void;What the editor does, as onEvent hears it. Returns an unsubscribe function.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
listener |
(event) => void |
Returns
Section titled “Returns”() => void
text()
Section titled “text()”text(text): string;Text in the editor’s language as it is now, for the plugin’s own DOM in dialogs and panels.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
text |
PluginText |
Returns
Section titled “Returns”string