Skip to main content
When a plugin button is enabled, it is shown in the toolbar/lasso toolbar/text-selection toolbar. When disabled, the corresponding button is not shown.
getButtonState(id: number): Promise<boolean>;
Returns
  • Promise<boolean>: button state, true enabled, false disabled

Example

import { PluginManager } from 'sn-plugin-lib';

/**
 * Example: get button state.
 */
export async function exampleGetButtonState() {
 const enabled = await PluginManager.getButtonState(1);
 return enabled;
}