@mendix/extensions-api - v0.2.4
    Preparing search index...

    Interface IDocumentEditorApi

    Every component API must implement this interface, which is usually done by inheriting from ComponentApiBase.

    This interface exists because APIs can be distributed by an interface alone (that inherits from this one), where the inplementation can live in another web context and is thus unknown.

    interface IDocumentEditorApi {
        _apiId: "mendix.DocumentEditorApi";
        addContextMenu(menuItem: Menu, documentType: string): Promise<void>;
        addEventListener<K extends never>(
            eventType: K,
            listener: EventHandler<{}, K>,
        ): DisposeListener;
        removeEventListener<K extends never>(
            eventType: K,
            listener: EventHandler<{}, K>,
        ): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    _apiId: "mendix.DocumentEditorApi"

    Unique identifier that can be used to register or retrieve a specific API.

    Example: mendix.EditorsAPI, mycompany.MyFunkyAPI

    Methods

    • Adds a context menu item to the existing list of context menus for an element in Studio Pro.

      Parameters

      • menuItem: Menu

        The menu item to add.

      • documentType: string

      Returns Promise<void>

    • Adds an event listener for the specified event type.

      Type Parameters

      • K extends never

      Parameters

      • eventType: K

        The type of event to listen for.

      • listener: EventHandler<{}, K>

        The event listener to add.

      Returns DisposeListener

      A function that can be called to remove the event listener.

    • Removes an event listener for the specified event type.

      Type Parameters

      • K extends never

      Parameters

      • eventType: K

        The type of event to remove the listener from.

      • listener: EventHandler<{}, K>

        The event listener to remove.

      Returns void