Skip to content

Choose fields and input controls

Choose a field type for the value you need to store. The dashboard derives its input control from that type; editor.json does not select a separate widget.

Type in definition.json Stored value What the owner uses
text String One-line input, or a textarea when maxLength > 350.
richText Sanitized HTML string A rich-text editor with supported simple formatting.
asset Asset ID string A single asset picker with a clear action.
link Destination string A text input; the platform validates permitted destinations.
boolean Boolean A checkbox.
group Object of child values A labeled fieldset containing its nested fields.
list Array of objects A repeatable collection with add, remove and reorder controls.

There is no textarea, number, select, date or email content-field type in this contract. For example, a contact phone number in business content is a text field. The separate lead-form API has its own field kinds; do not copy those into the content definition.

  • label names the input for the owner. Prefer “Main headline” to “title”.
  • required: true means the value must be present for publication; draft content may be incomplete.
  • maxLength limits strings. Choose a short limit for headlines and a longer one for prose. Long text fields become textareas only above 350.
  • A list requires maxItems between 1 and 50. minItems may be 0 through maxItems; its lower bound is enforced for publication.
  • A group or list defines child fields. Simple types do not have child fields.

Text limits do not create a grid, change heading typography, or resize the public page. Handle public presentation in your Astro/CSS.

A link is a stored destination, not a custom button component. Supported destinations include safe local paths, anchors and HTTP/HTTPS, mailto or tel links; platform-reserved/commerce destinations and unsafe URLs are rejected. Use the value in your authored markup.

Rich text is sanitized. Supported simple markup includes paragraphs, emphasis, lists, h2/h3 headings and blockquotes. It is not a place for scripts, arbitrary embeds or a full page builder.

Schema paths describe content, such as hero.title or services.0.title. The editor uses concrete paths to focus reported errors. A list index refers to a current item, not a permanent item ID.

Changing the input’s label is an interface edit. Changing its id or nesting changes where saved data lives; plan migrations before releasing such a change.

Project-provided labels are plain strings. Write the definition and editor labels for the owner audience; an object such as { "en": "...", "he": "..." } is not supported. The platform’s interface language and the language of saved content are separate from these schema labels.

The contract has no per-field placeholder, help-text or conditional-visibility properties. Make labels clear, choose sensible defaults, and use sections to provide context. Do not add unsupported configuration keys to simulate those features.