am_text: Create an Automerge text object

View source: R/objects.R

am_textR Documentation

Create an Automerge text object

Description

Creates a text object for collaborative character-level editing. Unlike regular strings (which use last-write-wins semantics), text objects support character-level CRDT merging of concurrent edits, cursor stability, and marks/formatting.

Usage

am_text(initial = "")

Arguments

initial

Initial text content (default "")

Details

Use text objects for collaborative document editing. Use regular strings for metadata, labels, and IDs (99\

Value

A character vector with class am_text_type

Examples

# Empty text object
am_text()

# Text with initial content
am_text("Hello, World!")


automerge documentation built on Feb. 5, 2026, 5:08 p.m.