The default plugin.
Interface: IPlugin.
This interface must be used in each plugin because the plugin status is required to embed the plugin in the portal.
Name | Description | Type | Example |
status | Stores the plugin status (active or hide). | PluginStatus | "active" |
onLoadCallback | Stores callback which will be executed when uploading the plugin to the portal. | func |
updateStatus - update the plugin status.
Name | Description | Type | Example |
status | Defines a new plugin status (active or hide). | PluginStatus | "active" |
getStatus - get the plugin status.
setOnLoadCallback - sets the onLoadCallback variable to the plugin.
Name | Description | Type | Example |
callback | Defines callback which will be executed when uploading the plugin to the portal. | fucn | callback |
import {IPlugin, PluginStatus} from "@onlyoffice/docspace-plugin-sdk"; class Plugin implements IPlugin { status: PluginStatus = PluginStatus.active; onLoadCallback = async () => {}; updateStatus = (status: PluginStatus) => { this.status = status; }; getStatus = () => { return this.status; }; setOnLoadCallback = (callback: () => Promise<void>) => { this.onLoadCallback = callback; }; }