textmode.js / plugins / TextmodePlugin
Interface: TextmodePlugin
A plugin interface for extending the functionality of a Textmodifier instance.
Users can create plugins by implementing this interface.
Note
Plugins are currently experimental and the API may change in future releases. The documentation is still lacking, but there are some add-on libraries already available, all of which are fully open source and can be used as references for creating your own plugins.
Properties
| Property | Type | Description |
|---|---|---|
name | string | Unique name for the plugin. |
version? | string | Version string for the plugin. |
Methods
install()
ts
install(textmodifier, api): 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. |
api | TextmodePluginAPI | An API object providing access to the Textmodifier's context and hook registration methods. |
Returns
void | Promise<void>
uninstall()?
ts
optional uninstall(textmodifier, api): 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. |
api | TextmodePluginAPI | An API object providing access to the Textmodifier's context and hook registration methods. |
Returns
void | Promise<void>