Skip to content

API reference / Common / Engine types / TextStory

Interface: TextStory ​

The story a text body holds: its stable [TextStoryId], the ordered [TextBlock]s, and the offset root the editing API (insert_at / delete_range / set_property_range) addresses.

len is the story's total span. No absolute offsets are stored — a node's start is derived by walking, and the binary-searchable absolute index lives in the layout (Wax*), kept consistent by apply.

One story is one independent offset space. A nested story (a table cell, an inline object) is a separate TextStory reached by descending into the 1-unit slot its host occupies here — never by a global offset.

Properties ​

PropertyDescription
id
string
Stable model id — the frames composing the story key off this.
blocks
TextBlock[]
The blocks, in flow order.