@witchcraft/editor
    Preparing search index...

    Variable MenusConst

    Menus: Extension<{}, { menus: Menu[] }> = ...

    Helps coordinate the display of different menus, never allowing more than one to be opened, sorting by priority, and autoclosing others. *.

    If this extension is available, extensions with menus will register themselves, some with a higher priority than others.

    On each transaction, the extension will check in order of priority if any of the registered menus should be opened and save which menu that is to it's menusPluginKey, closing other open menus.

    The MarkMenuManager component is used in the editor wrapper to easily display "mark" menus with the help of this extension. If it is not used, they won't show since they must be added manually. The commponent reads the saved state and if the menu is a mark menu and a renderer has been provided for it using the menusInjectionKey, it renders the menu. The editor wrapper provides the menus option which takes care of providing the menus.

    * Note that menus may choose to not implement or not provide a close command. In cases like "mark" menus this is fine if using the MarkMenuManager since it will only ever display one menu, but can otherwise break the intended purpose of the extension.