Nutrient Web SDK
    Preparing search index...

    Interface TextComparisonInstanceHideconstructor

    A mounted text comparison instance.

    You can generate an instance for text comparison by using NutrientViewer.loadTextComparison.

    interface TextComparisonInstance {
        addEventListener: <K extends keyof TextComparisonEventsMap>(
            action: K,
            listener: TextComparisonEventsMap[K],
        ) => void;
        getChanges: () => {
            deletedText: string;
            deletionAnnotations: NutrientViewer.Immutable.List<
                NutrientViewer.Annotations.HighlightAnnotation,
            >;
            deletionCount: number;
            insertedText: string;
            insertionAnnotations: NutrientViewer.Immutable.List<
                NutrientViewer.Annotations.HighlightAnnotation,
            >;
            insertionCount: number;
            operationType: TextComparisonOperationTypes;
            pages: NutrientViewer.Immutable.Set<number>;
        }[];
        getComparisonVisibility: () => boolean;
        getCurrentChangeIndex: () => number;
        getInnerToolbarItems: () => TextComparisonInnerToolbarItem[];
        getScrollLock: () => boolean;
        getToolbarItems: () => TextComparisonToolbarItem[];
        goToNextChange: () => number;
        goToPreviousChange: () => number;
        jumpToChange: (changeIndex: number) => number;
        removeEventListener: <K extends keyof TextComparisonEventsMap>(
            action: K,
            listener: TextComparisonEventsMap[K],
        ) => void;
        setComparisonSidebarConfig: (
            comparisonSidebarConfig: TextComparisonSidebarConfiguration,
        ) => Promise<void>;
        setComparisonVisibility: (flag: boolean) => void;
        setCurrentChangeIndex: (changeIndex: number) => void;
        setInnerToolbarItems: (
            toolbarItemsCallback:
                | TextComparisonInnerToolbarItem[]
                | (
                    (
                        currentState: TextComparisonToolbarItem[],
                    ) => TextComparisonToolbarItem[]
                ),
        ) => void;
        setScrollLock: (flag: boolean) => void;
        setToolbarItems: (
            toolbarItemsCallback:
                | TextComparisonToolbarItem[]
                | (
                    (
                        currentState: TextComparisonToolbarItem[],
                    ) => TextComparisonToolbarItem[]
                ),
        ) => void;
        unload: () => void;
    }
    Index

    Properties

    addEventListener: <K extends keyof TextComparisonEventsMap>(
        action: K,
        listener: TextComparisonEventsMap[K],
    ) => void
    getChanges: () => {
        deletedText: string;
        deletionAnnotations: NutrientViewer.Immutable.List<
            NutrientViewer.Annotations.HighlightAnnotation,
        >;
        deletionCount: number;
        insertedText: string;
        insertionAnnotations: NutrientViewer.Immutable.List<
            NutrientViewer.Annotations.HighlightAnnotation,
        >;
        insertionCount: number;
        operationType: TextComparisonOperationTypes;
        pages: NutrientViewer.Immutable.Set<number>;
    }[]
    getComparisonVisibility: () => boolean
    getCurrentChangeIndex: () => number
    getInnerToolbarItems: () => TextComparisonInnerToolbarItem[]
    getScrollLock: () => boolean
    getToolbarItems: () => TextComparisonToolbarItem[]
    goToNextChange: () => number
    goToPreviousChange: () => number
    jumpToChange: (changeIndex: number) => number
    removeEventListener: <K extends keyof TextComparisonEventsMap>(
        action: K,
        listener: TextComparisonEventsMap[K],
    ) => void
    setComparisonSidebarConfig: (
        comparisonSidebarConfig: TextComparisonSidebarConfiguration,
    ) => Promise<void>
    setComparisonVisibility: (flag: boolean) => void
    setCurrentChangeIndex: (changeIndex: number) => void
    setInnerToolbarItems: (
        toolbarItemsCallback:
            | TextComparisonInnerToolbarItem[]
            | (
                (
                    currentState: TextComparisonToolbarItem[],
                ) => TextComparisonToolbarItem[]
            ),
    ) => void
    setScrollLock: (flag: boolean) => void
    setToolbarItems: (
        toolbarItemsCallback:
            | TextComparisonToolbarItem[]
            | (
                (
                    currentState: TextComparisonToolbarItem[],
                ) => TextComparisonToolbarItem[]
            ),
    ) => void
    unload: () => void