Nutrient Web SDK
    Preparing search index...

    Type Alias DocumentEditorUIHandler

    An object provided the Nutrient Web SDK to custom items in the document editor toolbar and footer. This object contains methods that can be invoked to retrieve and modify the current stack of document operations to be applied to the open document.

    type DocumentEditorUIHandler = {
        getSelectedPageIndexes: () => number[];
        setOperations: (
            callback: (
                stagedDocumentOperations: NutrientViewer.Immutable.List<
                    | DocumentOperationsUnion
                    | NutrientViewer.Immutable.List<DocumentOperationsUnion>,
                >,
            ) => NutrientViewer.Immutable.List<
                | DocumentOperationsUnion
                | NutrientViewer.Immutable.List<DocumentOperationsUnion>,
            >,
            clearPagesSelection?: boolean,
        ) => void | Promise<void>;
    }
    Index

    Properties

    getSelectedPageIndexes: () => number[]

    Retrieve the page indexes of the currently selected pages. This function can be used to set the scope of a new document operation, for example.

    Type Declaration

      • (): number[]
      • Returns number[]

        The page indexes of the currently selected pages.

    setOperations: (
        callback: (
            stagedDocumentOperations: NutrientViewer.Immutable.List<
                | DocumentOperationsUnion
                | NutrientViewer.Immutable.List<DocumentOperationsUnion>,
            >,
        ) => NutrientViewer.Immutable.List<
            | DocumentOperationsUnion
            | NutrientViewer.Immutable.List<DocumentOperationsUnion>,
        >,
        clearPagesSelection?: boolean,
    ) => void | Promise<void>