@nextcloud/files
    Preparing search index...

    Interface NewMenuEntry

    interface NewMenuEntry {
        category?: TNewMenuEntryCategory;
        displayName: string;
        enabled?: (context: IFolder) => boolean;
        handler: (context: IFolder, content: INode[]) => void;
        iconSvgInline?: string;
        id: string;
        order?: number;
    }
    Index

    Properties

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

    NewMenuEntryCategory.CreateNew
    

    NewMenuEntryCategory

    3.3.0

    displayName: string

    Translatable string displayed in the menu

    enabled?: (context: IFolder) => boolean

    Condition wether this entry is shown or not

    Type Declaration

      • (context: IFolder): boolean
      • Parameters

        • context: IFolder

          the creation context. Usually the current folder

        Returns boolean

    handler: (context: IFolder, content: INode[]) => void

    Function to be run after creation

    Type Declaration

      • (context: IFolder, content: INode[]): void
      • Parameters

        • context: IFolder

          The creation context. Usually the current folder

        • content: INode[]

          List of file/folders present in the context folder

        Returns void

    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