Sanity Library Reference Docs
    Preparing search index...

    Variable updateCommentAnchorConst Beta

    updateCommentAnchor: (
        instance: SanityInstance,
        options: UpdateCommentAnchorOptions,
    ) => Promise<void> = ...

    Re-anchors a comment to a different run of text.

    Separate from updateComment because re-anchoring is mechanical — the content moved under the comment — rather than something a person wrote, so it leaves lastEditedAt alone. The API resolves the new anchor into a selection, so the change shows up on selection once the write lands.

    Type declaration