Home

Text

Intended mostly for use for inline text e.g. the text in a paragraph.

Differs from the primitive String type in that it has a type and id property. The id property allows use to identify text nodes with a sequence of inline nodes for better diffing.

Also, in Rust, the value property is implemented as a CRDT.

Properties

The Text type has these properties:

NameDescriptionTypeInherited from
idThe identifier for this item.StringEntity
valueThe value of the text contentCord-
compilationMessagesMessages generated while compiling the text.CompilationMessage*-

Related

The Text type is related to these types:

Bindings

The Text type is represented in:

Testing

During property-based (a.k.a generative) testing, the properties of the Text type are generated using the following strategies.

PropertyComplexityDescriptionStrategy
valueMin+Generate a fixed string of text.Cord::from("text")
Low+Generate a random string of up to 10 alphanumeric characters.r"[a-zA-Z0-9]{1,10}".prop_map(Cord::from)
High+Generate a random string of up to 100 alphanumeric characters, some special characters commonly used in prose, and whitespace.r"[a-zA-Z0-9 \t\-_.!?*+-/()'<>=]{1,100}".prop_map(Cord::from)
MaxGenerate an arbitrary string.String::arbitrary().prop_map(Cord::from)

This documentation was generated from Text.yaml by docs_types.rs.

© 2026 Stencila