@nextcloud/viewer
    Preparing search index...

    Type Alias ViewerOptions

    Options for opening the viewer

    type ViewerOptions = {
        canLoop?: boolean;
        editing?: boolean;
        enableSidebar?: boolean;
        folder?: IFolder;
        loadMore?: () => Promise<IFile[]>;
        onClose?: () => void;
        onEditingChange?: (editing: boolean) => void;
        onNext?: (file: IFile) => void;
        onPrev?: (file: IFile) => void;
        view?: IView;
    }
    Index
    canLoop?: boolean

    Whether the viewer can loop from last to first item and vice versa. Defaults to true.

    editing?: boolean

    Whether to open straight into editing mode (e.g. from an editing=true URL). Ignored for handlers that do not support editing.

    enableSidebar?: boolean

    Whether to offer the Files sidebar for the open file. Defaults to true. Turn it off for a file the sidebar cannot resolve, such as an old version of a file, which is served from its own dav endpoint.

    folder?: IFolder

    The folder the opened files live in. Forwarded to those file actions.

    loadMore?: () => Promise<IFile[]>

    Will be called to append more files when reaching the end of the current list

    onClose?: () => void

    Called when the viewer is closed

    onEditingChange?: (editing: boolean) => void

    Called when the editing state changes, so the opener can reflect it (e.g. in the URL).

    onNext?: (file: IFile) => void

    Called when navigating to the next item, with the file navigated to.

    onPrev?: (file: IFile) => void

    Called when navigating to the previous item, with the file navigated to.

    view?: IView

    The files view the viewer was opened from. Forwarded to the file actions rendered inside the viewer (download, delete, details, …) so they can run with the same context as in the files list.