Nutrient Web SDK
    Preparing search index...

    Class TextSelection

    Information about the currently selected text in the PDF. You can listen for changes using the NutrientViewer.EventName.TEXT_SELECTION_CHANGE.

    Example

    Read the currently selected text of an Instance

    const textSelection = instance.getTextSelection();
    textSelection.getText().then(text => console.log(text));
    

    Register a TextSelectionChangeEvent

    instance.addEventListener("textSelection.change", (textSelection) => {
      if (textSelection) {
        console.log("text is selected");
      } else {
        console.log("no text is selected");
      }
    });
    

    Hierarchy

    • Record<
          {
              endNestedContentBlockId: null
              | string;
              endNode: null | Text;
              endOffset: null | number;
              endPageIndex: null | number;
              endTextLineId: null | number;
              getBoundingClientRect:
                  | null
                  | (() => Promise<null | NutrientViewer.Geometry.Rect>);
              getSelectedRectsPerPage:
                  | null
                  | (
                      () => Promise<
                          NutrientViewer.Immutable.List<
                              {
                                  pageIndex: number;
                                  rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                              },
                          >,
                      >
                  );
              getSelectedTextLines: | null
              | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
              getText: null | (() => Promise<string>);
              startNestedContentBlockId: null | string;
              startNode: null | Text;
              startOffset: null | number;
              startPageIndex: null | number;
              startTextLineId: null | number;
          },
          this,
      > & Readonly<
          {
              endNestedContentBlockId: null
              | string;
              endNode: null | Text;
              endOffset: null | number;
              endPageIndex: null | number;
              endTextLineId: null | number;
              getBoundingClientRect:
                  | null
                  | (() => Promise<null | NutrientViewer.Geometry.Rect>);
              getSelectedRectsPerPage:
                  | null
                  | (
                      () => Promise<
                          NutrientViewer.Immutable.List<
                              {
                                  pageIndex: number;
                                  rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                              },
                          >,
                      >
                  );
              getSelectedTextLines: | null
              | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
              getText: null | (() => Promise<string>);
              startNestedContentBlockId: null | string;
              startNode: null | Text;
              startOffset: null | number;
              startPageIndex: null | number;
              startTextLineId: null | number;
          },
      >
      • TextSelection
    Index

    Properties

    endNestedContentBlockId: string

    The NutrientViewer.TextLine#id of the last text line of this text selection.

    endNode: Text

    The HTML Text node at the end of this text selection.

    endOffset: number

    The HTML Text node offset of at the end of this text selection.

    endPageIndex: number

    The page index where the text selection ends.

    endTextLineId: number

    The NutrientViewer.TextLine#id of the last text line of this text selection.

    getBoundingClientRect: () => Promise<null | NutrientViewer.Geometry.Rect>

    Returns the bounding box in client coordinates of the current text selection, or null if the selection has been programmatically collapsed.

    Type Declaration

    const textSelection = instance.getTextSelection();
    textSelection.getBoundingClientRect().then(rect => console.log(rect));
    getSelectedRectsPerPage: () => Promise<
        NutrientViewer.Immutable.List<
            {
                pageIndex: number;
                rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
            },
        >,
    >

    Returns the individually selected text rectangles in the PDF page space for each page. This can be used to create e.g. NutrientViewer.Annotations.MarkupAnnotations at the current selection.

    Type Declaration

    const textSelection = instance.getTextSelection();
    textSelection.getSelectedRectsPerPage().then(rectsPerPage => {
    rectsPerPage.map(({ pageIndex, rects }) => {
    // We need to create one annotation per page.
    const annotation = new NutrientViewer.Annotations.HighlightAnnotation({
    pageIndex,
    boundingBox: NutrientViewer.Geometry.Rect.union(rects),
    rects,
    });
    instance.create(annotation);
    });
    });
    getSelectedTextLines: () => Promise<
        NutrientViewer.Immutable.List<NutrientViewer.TextLine>,
    >

    Returns an immutable list of all NutrientViewer.TextLines of this text selection.

    Type Declaration

    const textSelection = instance.getTextSelection();
    textSelection.getSelectedTextLines().then(lines => console.log(lines));
    getText: () => Promise<string>

    Returns the text of this text selection. Text blocks will be joined by a new line character (\n).

    Type Declaration

      • (): Promise<string>
      • Returns Promise<string>

        A promise that resolves to the text.

    const textSelection = instance.getTextSelection();
    textSelection.getText().then(text => console.log(text));
    startNestedContentBlockId: string

    The NutrientViewer.TextLine#id of the first text line of this text selection.

    startNode: Text

    The HTML Text node at the start of this text selection.

    startOffset: number

    The HTML Text node offset of at the start of this text selection.

    startPageIndex: number

    The page index where the text selection starts.

    startTextLineId: number

    The NutrientViewer.TextLine#id of the first text line of this text selection.

    Methods

    • Returns IterableIterator<
          [
              keyof {
                  endNestedContentBlockId: null
                  | string;
                  endNode: null | Text;
                  endOffset: null | number;
                  endPageIndex: null | number;
                  endTextLineId: null | number;
                  getBoundingClientRect:
                      | null
                      | (() => Promise<null | NutrientViewer.Geometry.Rect>);
                  getSelectedRectsPerPage:
                      | null
                      | (
                          () => Promise<
                              NutrientViewer.Immutable.List<
                                  {
                                      pageIndex: number;
                                      rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                                  },
                              >,
                          >
                      );
                  getSelectedTextLines: | null
                  | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
                  getText: null | (() => Promise<string>);
                  startNestedContentBlockId: null | string;
                  startNode: null | Text;
                  startOffset: null | number;
                  startPageIndex: null | number;
                  startTextLineId: null | number;
              },
              | null
              | string
              | number
              | Text
              | (() => Promise<string>)
              | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>)
              | (() => Promise<null | NutrientViewer.Geometry.Rect>)
              | (
                  () => Promise<
                      NutrientViewer.Immutable.List<
                          {
                              pageIndex: number;
                              rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                          },
                      >,
                  >
              ),
          ],
      >

    • Returns this

      Map#asImmutable

    • Returns this

      Map#asMutable

    • Returns a new instance of this Record type with all values set to their default values.

      Returns this

    • Returns a new instance of this Record type with the value for the specific key set to its default value.

      Type Parameters

      • K extends keyof {
            endNestedContentBlockId: null | string;
            endNode: null | Text;
            endOffset: null | number;
            endPageIndex: null | number;
            endTextLineId: null | number;
            getBoundingClientRect:
                | null
                | (() => Promise<null | NutrientViewer.Geometry.Rect>);
            getSelectedRectsPerPage:
                | null
                | (
                    () => Promise<
                        NutrientViewer.Immutable.List<
                            {
                                pageIndex: number;
                                rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                            },
                        >,
                    >
                );
            getSelectedTextLines: | null
            | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
            getText: null | (() => Promise<string>);
            startNestedContentBlockId: null | string;
            startNode: null | Text;
            startOffset: null | number;
            startPageIndex: null | number;
            startTextLineId: null | number;
        }

      Parameters

      • key: K

      Returns this

      remove

    • Parameters

      Returns this

      removeIn

    • Parameters

      • other: any

      Returns boolean

    • Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.

      If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.

      Type Parameters

      • K extends keyof {
            endNestedContentBlockId: null | string;
            endNode: null | Text;
            endOffset: null | number;
            endPageIndex: null | number;
            endTextLineId: null | number;
            getBoundingClientRect:
                | null
                | (() => Promise<null | NutrientViewer.Geometry.Rect>);
            getSelectedRectsPerPage:
                | null
                | (
                    () => Promise<
                        NutrientViewer.Immutable.List<
                            {
                                pageIndex: number;
                                rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                            },
                        >,
                    >
                );
            getSelectedTextLines: | null
            | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
            getText: null | (() => Promise<string>);
            startNestedContentBlockId: null | string;
            startNode: null | Text;
            startOffset: null | number;
            startPageIndex: null | number;
            startTextLineId: null | number;
        }

      Parameters

      • key: K
      • OptionalnotSetValue: any

      Returns {
          endNestedContentBlockId: null | string;
          endNode: null | Text;
          endOffset: null | number;
          endPageIndex: null | number;
          endTextLineId: null | number;
          getBoundingClientRect:
              | null
              | (() => Promise<null | NutrientViewer.Geometry.Rect>);
          getSelectedRectsPerPage:
              | null
              | (
                  () => Promise<
                      NutrientViewer.Immutable.List<
                          {
                              pageIndex: number;
                              rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                          },
                      >,
                  >
              );
          getSelectedTextLines: | null
          | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
          getText: null | (() => Promise<string>);
          startNestedContentBlockId: null | string;
          startNode: null | Text;
          startOffset: null | number;
          startPageIndex: null | number;
          startTextLineId: null | number;
      }[K]

    • Type Parameters

      • T

      Parameters

      • key: string
      • notSetValue: T

      Returns T

    • Parameters

      Returns any

    • Parameters

      • key: string

      Returns key is
          | "startNestedContentBlockId"
          | "startTextLineId"
          | "startPageIndex"
          | "startNode"
          | "startOffset"
          | "endNestedContentBlockId"
          | "endTextLineId"
          | "endPageIndex"
          | "endNode"
          | "endOffset"
          | "getText"
          | "getSelectedTextLines"
          | "getBoundingClientRect"
          | "getSelectedRectsPerPage"

    • Returns number

    • Parameters

      Returns boolean

    • Parameters

      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    endNestedContentBlockId: null
                    | string;
                    endNode: null | Text;
                    endOffset: null | number;
                    endPageIndex: null | number;
                    endTextLineId: null | number;
                    getBoundingClientRect:
                        | null
                        | (() => Promise<null | NutrientViewer.Geometry.Rect>);
                    getSelectedRectsPerPage:
                        | null
                        | (
                            () => Promise<
                                NutrientViewer.Immutable.List<
                                    {
                                        pageIndex: number;
                                        rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                                    },
                                >,
                            >
                        );
                    getSelectedTextLines: | null
                    | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
                    getText: null | (() => Promise<string>);
                    startNestedContentBlockId: null | string;
                    startNode: null | Text;
                    startOffset: null | number;
                    startPageIndex: null | number;
                    startTextLineId: null | number;
                },
            >
        )[]

      Returns this

    • Parameters

      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    endNestedContentBlockId: null
                    | string;
                    endNode: null | Text;
                    endOffset: null | number;
                    endPageIndex: null | number;
                    endTextLineId: null | number;
                    getBoundingClientRect:
                        | null
                        | (() => Promise<null | NutrientViewer.Geometry.Rect>);
                    getSelectedRectsPerPage:
                        | null
                        | (
                            () => Promise<
                                NutrientViewer.Immutable.List<
                                    {
                                        pageIndex: number;
                                        rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                                    },
                                >,
                            >
                        );
                    getSelectedTextLines: | null
                    | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
                    getText: null | (() => Promise<string>);
                    startNestedContentBlockId: null | string;
                    startNode: null | Text;
                    startOffset: null | number;
                    startPageIndex: null | number;
                    startTextLineId: null | number;
                },
            >
        )[]

      Returns this

    • Parameters

      • keyPath: Iterable<any>
      • ...collections: any[]

      Returns this

    • Parameters

      • merger: (oldVal: any, newVal: any, key: any) => any
      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    endNestedContentBlockId: null
                    | string;
                    endNode: null | Text;
                    endOffset: null | number;
                    endPageIndex: null | number;
                    endTextLineId: null | number;
                    getBoundingClientRect:
                        | null
                        | (() => Promise<null | NutrientViewer.Geometry.Rect>);
                    getSelectedRectsPerPage:
                        | null
                        | (
                            () => Promise<
                                NutrientViewer.Immutable.List<
                                    {
                                        pageIndex: number;
                                        rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                                    },
                                >,
                            >
                        );
                    getSelectedTextLines: | null
                    | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
                    getText: null | (() => Promise<string>);
                    startNestedContentBlockId: null | string;
                    startNode: null | Text;
                    startOffset: null | number;
                    startPageIndex: null | number;
                    startTextLineId: null | number;
                },
            >
        )[]

      Returns this

    • Parameters

      • keyPath: Iterable<any>
      • ...collections: any[]

      Returns this

    • Parameters

      • merger: (
            oldVal: any,
            newVal: any,
            key: keyof {
                endNestedContentBlockId: null | string;
                endNode: null | Text;
                endOffset: null | number;
                endPageIndex: null | number;
                endTextLineId: null | number;
                getBoundingClientRect:
                    | null
                    | (() => Promise<null | NutrientViewer.Geometry.Rect>);
                getSelectedRectsPerPage:
                    | null
                    | (
                        () => Promise<
                            NutrientViewer.Immutable.List<
                                {
                                    pageIndex: number;
                                    rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                                },
                            >,
                        >
                    );
                getSelectedTextLines: | null
                | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
                getText: null | (() => Promise<string>);
                startNestedContentBlockId: null | string;
                startNode: null | Text;
                startOffset: null | number;
                startPageIndex: null | number;
                startTextLineId: null | number;
            },
        ) => any
      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    endNestedContentBlockId: null
                    | string;
                    endNode: null | Text;
                    endOffset: null | number;
                    endPageIndex: null | number;
                    endTextLineId: null | number;
                    getBoundingClientRect:
                        | null
                        | (() => Promise<null | NutrientViewer.Geometry.Rect>);
                    getSelectedRectsPerPage:
                        | null
                        | (
                            () => Promise<
                                NutrientViewer.Immutable.List<
                                    {
                                        pageIndex: number;
                                        rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                                    },
                                >,
                            >
                        );
                    getSelectedTextLines: | null
                    | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
                    getText: null | (() => Promise<string>);
                    startNestedContentBlockId: null | string;
                    startNode: null | Text;
                    startOffset: null | number;
                    startPageIndex: null | number;
                    startTextLineId: null | number;
                },
            >
        )[]

      Returns this

    • Type Parameters

      • K extends keyof {
            endNestedContentBlockId: null | string;
            endNode: null | Text;
            endOffset: null | number;
            endPageIndex: null | number;
            endTextLineId: null | number;
            getBoundingClientRect:
                | null
                | (() => Promise<null | NutrientViewer.Geometry.Rect>);
            getSelectedRectsPerPage:
                | null
                | (
                    () => Promise<
                        NutrientViewer.Immutable.List<
                            {
                                pageIndex: number;
                                rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                            },
                        >,
                    >
                );
            getSelectedTextLines: | null
            | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
            getText: null | (() => Promise<string>);
            startNestedContentBlockId: null | string;
            startNode: null | Text;
            startOffset: null | number;
            startPageIndex: null | number;
            startTextLineId: null | number;
        }

      Parameters

      • key: K

      Returns this

    • Parameters

      Returns this

    • Type Parameters

      • K extends keyof {
            endNestedContentBlockId: null | string;
            endNode: null | Text;
            endOffset: null | number;
            endPageIndex: null | number;
            endTextLineId: null | number;
            getBoundingClientRect:
                | null
                | (() => Promise<null | NutrientViewer.Geometry.Rect>);
            getSelectedRectsPerPage:
                | null
                | (
                    () => Promise<
                        NutrientViewer.Immutable.List<
                            {
                                pageIndex: number;
                                rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                            },
                        >,
                    >
                );
            getSelectedTextLines: | null
            | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
            getText: null | (() => Promise<string>);
            startNestedContentBlockId: null | string;
            startNode: null | Text;
            startOffset: null | number;
            startPageIndex: null | number;
            startTextLineId: null | number;
        }

      Parameters

      • key: K
      • value: {
            endNestedContentBlockId: null | string;
            endNode: null | Text;
            endOffset: null | number;
            endPageIndex: null | number;
            endTextLineId: null | number;
            getBoundingClientRect:
                | null
                | (() => Promise<null | NutrientViewer.Geometry.Rect>);
            getSelectedRectsPerPage:
                | null
                | (
                    () => Promise<
                        NutrientViewer.Immutable.List<
                            {
                                pageIndex: number;
                                rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                            },
                        >,
                    >
                );
            getSelectedTextLines: | null
            | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
            getText: null | (() => Promise<string>);
            startNestedContentBlockId: null | string;
            startNode: null | Text;
            startOffset: null | number;
            startPageIndex: null | number;
            startTextLineId: null | number;
        }[K]

      Returns this

    • Parameters

      Returns this

    • Deeply converts this Record to equivalent native JavaScript Object.

      Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.

      Returns {
          endNestedContentBlockId: any;
          endNode: any;
          endOffset: any;
          endPageIndex: any;
          endTextLineId: any;
          getBoundingClientRect: any;
          getSelectedRectsPerPage: any;
          getSelectedTextLines: any;
          getText: any;
          startNestedContentBlockId: any;
          startNode: any;
          startOffset: any;
          startPageIndex: any;
          startTextLineId: any;
      }

    • Shallowly converts this Record to equivalent native JavaScript Object.

      Returns {
          endNestedContentBlockId: null | string;
          endNode: null | Text;
          endOffset: null | number;
          endPageIndex: null | number;
          endTextLineId: null | number;
          getBoundingClientRect:
              | null
              | (() => Promise<null | NutrientViewer.Geometry.Rect>);
          getSelectedRectsPerPage:
              | null
              | (
                  () => Promise<
                      NutrientViewer.Immutable.List<
                          {
                              pageIndex: number;
                              rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                          },
                      >,
                  >
              );
          getSelectedTextLines: | null
          | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
          getText: null | (() => Promise<string>);
          startNestedContentBlockId: null | string;
          startNode: null | Text;
          startOffset: null | number;
          startPageIndex: null | number;
          startTextLineId: null | number;
      }

    • Shallowly converts this Record to equivalent JavaScript Object.

      Returns {
          endNestedContentBlockId: null | string;
          endNode: null | Text;
          endOffset: null | number;
          endPageIndex: null | number;
          endTextLineId: null | number;
          getBoundingClientRect:
              | null
              | (() => Promise<null | NutrientViewer.Geometry.Rect>);
          getSelectedRectsPerPage:
              | null
              | (
                  () => Promise<
                      NutrientViewer.Immutable.List<
                          {
                              pageIndex: number;
                              rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                          },
                      >,
                  >
              );
          getSelectedTextLines: | null
          | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
          getText: null | (() => Promise<string>);
          startNestedContentBlockId: null | string;
          startNode: null | Text;
          startOffset: null | number;
          startPageIndex: null | number;
          startTextLineId: null | number;
      }

    • Returns Keyed<
          keyof {
              endNestedContentBlockId: null
              | string;
              endNode: null | Text;
              endOffset: null | number;
              endPageIndex: null | number;
              endTextLineId: null | number;
              getBoundingClientRect:
                  | null
                  | (() => Promise<null | NutrientViewer.Geometry.Rect>);
              getSelectedRectsPerPage:
                  | null
                  | (
                      () => Promise<
                          NutrientViewer.Immutable.List<
                              {
                                  pageIndex: number;
                                  rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                              },
                          >,
                      >
                  );
              getSelectedTextLines: | null
              | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
              getText: null | (() => Promise<string>);
              startNestedContentBlockId: null | string;
              startNode: null | Text;
              startOffset: null | number;
              startPageIndex: null | number;
              startTextLineId: null | number;
          },
          | null
          | string
          | number
          | Text
          | (() => Promise<string>)
          | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>)
          | (() => Promise<null | NutrientViewer.Geometry.Rect>)
          | (
              () => Promise<
                  NutrientViewer.Immutable.List<
                      {
                          pageIndex: number;
                          rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                      },
                  >,
              >
          ),
      >

    • Type Parameters

      • K extends keyof {
            endNestedContentBlockId: null | string;
            endNode: null | Text;
            endOffset: null | number;
            endPageIndex: null | number;
            endTextLineId: null | number;
            getBoundingClientRect:
                | null
                | (() => Promise<null | NutrientViewer.Geometry.Rect>);
            getSelectedRectsPerPage:
                | null
                | (
                    () => Promise<
                        NutrientViewer.Immutable.List<
                            {
                                pageIndex: number;
                                rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                            },
                        >,
                    >
                );
            getSelectedTextLines: | null
            | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
            getText: null | (() => Promise<string>);
            startNestedContentBlockId: null | string;
            startNode: null | Text;
            startOffset: null | number;
            startPageIndex: null | number;
            startTextLineId: null | number;
        }

      Parameters

      • key: K
      • updater: (
            value: {
                endNestedContentBlockId: null | string;
                endNode: null | Text;
                endOffset: null | number;
                endPageIndex: null | number;
                endTextLineId: null | number;
                getBoundingClientRect:
                    | null
                    | (() => Promise<null | NutrientViewer.Geometry.Rect>);
                getSelectedRectsPerPage:
                    | null
                    | (
                        () => Promise<
                            NutrientViewer.Immutable.List<
                                {
                                    pageIndex: number;
                                    rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                                },
                            >,
                        >
                    );
                getSelectedTextLines: | null
                | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
                getText: null | (() => Promise<string>);
                startNestedContentBlockId: null | string;
                startNode: null | Text;
                startOffset: null | number;
                startPageIndex: null | number;
                startTextLineId: null | number;
            }[K],
        ) => {
            endNestedContentBlockId: null
            | string;
            endNode: null | Text;
            endOffset: null | number;
            endPageIndex: null | number;
            endTextLineId: null | number;
            getBoundingClientRect:
                | null
                | (() => Promise<null | NutrientViewer.Geometry.Rect>);
            getSelectedRectsPerPage:
                | null
                | (
                    () => Promise<
                        NutrientViewer.Immutable.List<
                            {
                                pageIndex: number;
                                rects: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                            },
                        >,
                    >
                );
            getSelectedTextLines: | null
            | (() => Promise<NutrientViewer.Immutable.List<NutrientViewer.TextLine>>);
            getText: null | (() => Promise<string>);
            startNestedContentBlockId: null | string;
            startNode: null | Text;
            startOffset: null | number;
            startPageIndex: null | number;
            startTextLineId: null | number;
        }[K]

      Returns this

    • Parameters

      • keyPath: Iterable<any>
      • updater: (value: any) => any

      Returns this

    • Returns boolean

      Map#wasAltered

    • Note: Not all methods can be used on a mutable collection or within withMutations! Only set may be used mutatively.

      Parameters

      • mutator: (mutable: this) => any

      Returns this

      Map#withMutations