Skip to content

OnMenuAction

Called when the user clicks a plugin menu item.

When is this called?

Use Host API callbacks during execution to interact with the host application.

C# Override

public override void OnMenuAction(OnMenuActionRequest request)
{
    if (request.MenuItemId != "my-search")
        return;

    Host.ShowMessage("Hello from MyPlugin");
}

Request

Field Type Required Description
menuItemId string โœ… ID of the clicked menu item.
parentWindowHandle integer โœ… HWND for modal dialog ownership.
context PluginContext โœ… Current host application state.

Response

This method returns no data on success.

JSON

The SDK serializes these JSON bodies for you.

{
  "menuItemId": "my-search",
  "parentWindowHandle": 0,
  "context": "..."
}
{}

JSON Schemas: Request ยท Response