Preparing search index...
        // Define a ContextAction and hand it to the context-action registry so it
    // shows up in the right-click menu. registerAction expects a callback; use
    // the ContextAction's id/caption/group to describe what gets rendered.
    const registry = this.pluginSystem.findInterface(
    Editor.IContextActionRegistry.interfaceId
    ) as Editor.IContextActionRegistry;

    const action = new Editor.ContextAction();
    action.id = 'my-plugin.greet';
    action.caption = 'Say Hello';
    action.description = 'Prints a greeting to the console';
    action.group = ['My Plugin', 'Utilities'];
    action.apply = () => {
    console.log(`[${action.id}] Hello from context action!`);
    };

    // Wire the action into the registry. Dispose the guard in stop() to unregister.
    const guard = registry.registerAction((_ctx: Editor.IContext) => {
    action.apply();
    return undefined as unknown as Editor;
    });
    this.guards.push(guard);
    Index

    Constructors

    Properties

    Constructors

    Properties

    apply: () => void

    Callback for when the action is executed.

    caption: string

    Caption for the action.

    description: string

    Description for the action.

    group: string[]

    Section for the action to be in.

    id: string

    Identifier for the caption.