ProfileMenuPlugin

The plugin that is embedded in the profile menu.

Interface: IProfileMenuPlugin.

Variables

profileMenuItems

Stores a collection of elements where the keys are the key parameters from the ProfileMenuItem objects. A list for embedding into the profile menu is generated based on this collection.

Type: collection of IProfileMenuItem

Methods and their description

addProfileMenuItem

Add a new profile menu item.

Parameters:

NameTypeExampleDescription
profileMenuItemsIProfileMenuItemDefines a profile menu item.

getProfileMenuItems

Get all the profile menu items.

updateProfileMenuItem

Update the profile menu item.

Parameters:

NameTypeExampleDescription
profileMenuItemsIProfileMenuItemDefines a new profile menu item.

Example

import {type IProfileMenuItemIProfileMenuPlugin, type IProfileMenuPlugin} from "@onlyoffice/docspace-plugin-sdk"

class Plugin implements IProfileMenuPlugin {
  profileMenuItems = new Map<string, IProfileMenuItem>()

  addProfileMenuItem = (item: IProfileMenuItem): void => {
    this.profileMenuItems.set(item.key, item)
  }

  getProfileMenuItems = (): Map<string, IProfileMenuItem> => {
    return this.profileMenuItems
  }

  updateProfileMenuItem = (item: IProfileMenuItem): void => {
    this.profileMenuItems.set(item.key, item)
  }
}

Get Help

  • If you have any questions about ONLYOFFICE DocSpace, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).