Automerge Repo - v2.3.0-alpha.0
    Preparing search index...

    Variable updateTextConst

    updateText: (
        doc: Automerge.Doc<unknown>,
        path: Automerge.Prop[],
        newText: string,
    ) => void = Automerge.updateText

    Type declaration

      • (doc: Automerge.Doc<unknown>, path: Automerge.Prop[], newText: string): void
      • Beta

        Update the value of a string

        Parameters

        • doc: Automerge.Doc<unknown>

          The document to modify

        • path: Automerge.Prop[]

          The path to the string to modify

        • newText: string

          The new text to update the value to

        Returns void

        This will calculate a diff between the current value and the new value and then convert that diff into calls to splice. This will produce results which don't merge as well as directly capturing the user input actions, but sometimes it's not possible to capture user input and this is the best you can do.

        This is an experimental API and may change in the future.