Prose and inline models

A prose field is rich text that can also hold your own models, placed among the paragraphs in any order. The models it places are inline models, which you define once and reuse as field types.

Rich text with models in the flow

With no configuration a prose field takes text only: headings, bold and italic, links, lists, quotes and code. List what may be placed in allowedTypes: your inline models, and the built-in image, video, file, reference and geopoint types. A write carrying anything off the list is refused, and the error names the entry.

Turn typed text off and the field holds models only, stacked in whatever order your team places them.

What a read returns

The stored value is a flat, ordered list of entries. Each entry is a passage of text or a placed model, with a stable key that survives editing. A read gives you the typed entries, selected with inline fragments, along with HTML, Markdown and JSON forms. The HTML and Markdown carry the text only, so a renderer that shows placed models reads the entries.

Inline models

An inline model has no records of its own. Its key becomes a field type you can add to any model, and your team fills it in as a structured form, such as a hero banner or a testimonial card. Inline models nest inside each other, and one placed in prose can have a prose field of its own. Add a field to an inline model and it appears everywhere that model is embedded.

Lists

A list field is an ordered array with a declared item type: a built-in type, a reference, or an inline model, in which case each item is a structured value of that model. List writes use set, push, pull, splice and removeWhere.

Translation and variants

Prose is translatable. A variant can replace a single prose entry or a single list item, so one paragraph changes for an audience without the document being duplicated.

Read the detail

The field types reference covers the prose field, what it accepts and what a read returns, and inline models have a guide of their own.