interface Entry {
    category?: NewMenuEntryCategory;
    displayName: string;
    enabled?: ((context: Folder) => boolean);
    handler: ((context: Folder, content: Node[]) => void);
    iconClass?: string;
    iconSvgInline?: string;
    id: string;
    order?: number;
}

Properties

Category to put this entry in (supported since Nextcloud 30)

3.3.0

NewMenuEntryCategory.CreateNew
displayName: string

Translatable string displayed in the menu

enabled?: ((context: Folder) => boolean)

Condition wether this entry is shown or not

Type declaration

    • (context): boolean
    • Parameters

      • context: Folder

        the creation context. Usually the current folder

      Returns boolean

handler: ((context: Folder, content: Node[]) => void)

Function to be run after creation

Type declaration

    • (context, content): void
    • Parameters

      • context: Folder

        the creation context. Usually the current folder

      • content: Node[]

        list of file/folders present in the context folder

      Returns void

iconClass?: string

Existing icon css class

use iconSvgInline instead

iconSvgInline?: string

Either iconSvgInline or iconClass must be defined Svg as inline string.

id: string

Unique ID

order?: number

Order of the entry in the menu