TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

ProfileMenuItem

Describes an item that will be embedded in the profile menu.

Parameters
Name Description Type Example
Defines the unique item identifier used by the service to recognize the item. string "profile-menu-plugin"
Defines the item display name. string "Profile menu item"
Defines the item display icon. The icon image must be uploaded to the assets folder. Only the image name with the extension must be specified in this field. The required icon size is 16x16 px. Otherwise, it will be compressed to this size. string "logo.png"
Defines a function that takes the file/folder/room id as an argument. This function can be asynchronous. func () => {}
Defines the types of users who will see the current item in the profile menu. Currently the following user types are available: owner, docSpaceAdmin, roomAdmin, collaborator, user. If this parameter is not specified, then the current profile menu item will be displayed for all user types. array of UsersType [UsersType.owner, UsersType.docSpaceAdmin, UsersType.roomAdmin]
Defines the types of devices where the current item will be displayed in the profile menu. At the moment the following device types are available: mobile, tablet, desktop. If this parameter is not specified, then the current profile menu item will be displayed in any device types. array of Devices [Devices.desktop]
Example
import {IProfileMenuItem} from "@onlyoffice/docspace-plugin-sdk";

export const ProfileMenuItem: IProfileMenuItem = {
    "key": "profile-menu-plugin",
    "label": "Profile menu item",
    "icon": "logo.jpg",
    "onClick": () => {},
};