textmode.js / plugins / TextmodePlugin
Interface: TextmodePlugin
A plugin interface for extending the functionality of a Textmodifier instance.
Create plugins by implementing this interface.
Properties
| Property | Type | Description |
|---|---|---|
name | string | Unique name for the plugin. |
version? | string | Version string for the plugin. |
Methods
install()
ts
install(textmodifier, context): void | Promise<void>;Called when the plugin is installed on a Textmodifier instance.
Parameters
| Parameter | Type | Description |
|---|---|---|
textmodifier | Textmodifier | The Textmodifier instance the plugin is being installed on. |
context | TextmodePluginContext | A host-provided context exposing the Textmodifier runtime and plugin hook registration methods. |
Returns
void | Promise<void>
Example
uninstall()?
ts
optional uninstall(textmodifier, context): void | Promise<void>;Called when the plugin is uninstalled from a Textmodifier instance.
Parameters
| Parameter | Type | Description |
|---|---|---|
textmodifier | Textmodifier | The Textmodifier instance the plugin is being uninstalled from. |
context | TextmodePluginContext | A host-provided context exposing the Textmodifier runtime and plugin hook registration methods. |
Returns
void | Promise<void>