Command
An action with a label, shown on the toolbar, in More, or in the cell menu.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
icon? |
string |
- |
id |
string |
Unique within the plugin. |
label |
PluginText |
- |
where |
"toolbar" | "more" | "cellMenu" |
- |
Methods
Section titled “Methods”enabled()?
Section titled “enabled()?”optional enabled(context): boolean;Read again whenever the editor’s state changes, or the plugin calls commands.refresh().
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
CommandContext |
Returns
Section titled “Returns”boolean
preload()?
Section titled “preload()?”optional preload(): void;Called when the menu holding it opens, or the pointer rests on it: load an SDK here.
Returns
Section titled “Returns”void
run(context): void | Promise<void>;Runs inside the click, so a popup it opens straight away isn’t blocked.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
CommandContext |
Returns
Section titled “Returns”void | Promise<void>
visible()?
Section titled “visible()?”optional visible(context): boolean;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
CommandContext |
Returns
Section titled “Returns”boolean