# How to edit a site without breaking the design

> Give the editor fields, not a page builder. The sections are defined once with the design, and editing changes what is inside them, never the layout.

- The editor fills in fields; the website decides how they look.
- 7 kinds of field, from one line of text to a repeatable group.
- A draft until it is published, and the last 100 versions kept.

## Why editing breaks a website

A page builder hands whoever edits the layout itself. A headline pasted from a
document brings its own font with it, a button is dragged out of line, a
section is deleted along with the one that was meant to go. Every edit is a
design decision, whether or not the person making it meant one.

## Fields instead of a page

Give each section of the design a type, and the type a set of fields. A hero
has a headline, a line under it and a button. A price list has a repeatable
group of rows, each with a name and a price. Editing fills in the fields; the
website decides how each one looks, with its own components.

So the person editing can:

- change the words in any field,
- add and remove the lines of a list, and add, remove and reorder the rows of
  a group,
- add sections to a page, take them away and put them in order,

and cannot change a font, a colour, a spacing or the markup, because none of
those is in a field. A field holds text in some shape or an image from the
website's library, and there are
7 kinds:
text, paragraph, list of lines, link, true or false, repeatable group, image.

## What keeps it from breaking

- **A required field cannot be left empty.** The page is not saved, and the
  editor names the field that needs filling in.
- **Every value has a length it cannot pass**, and a save that would pass it is
  refused rather than cut short, so nobody loses half a paragraph without
  noticing.
- **A link has to go somewhere**: a web address, a path on the site, `mailto:`
  or `tel:`. One that would run a script is refused.
- **Editing changes a draft.** The website keeps showing the published version
  until somebody publishes, and can be told by webhook when that happens.
- **Mistakes can be undone.** The last 100 versions
  of each page are kept, and any of them can be brought back.

## The part the design still has to do

Fields keep out the wrong kind of content. They cannot make a design fit every
amount of the right kind. Try the design with the longest text each field
accepts, with every optional field left empty, and with a list of one row and
of many, before handing it over.

## When the design changes

The section types belong to the project and are never locked: a field can be
added or renamed when the design gains a new part. The 10
standard types a new project starts with are a starting point, not a rule.

[Content](/product/content/) has the rest, and [Headless CMS or
website builder?](/guides/headless-cms-or-website-builder/) is the
question before this one.

## Questions people ask next

### Can the editor change fonts or colours?

**No.** Those belong to the website's design. A field holds text or an image, and the website decides how it looks.

### What if a required field is left empty?

**The page is not saved.** The editor names the field that needs filling in, so nothing half finished reaches the website.

### Does a long headline break the layout?

**Not if the design allows for it.** Every field has a length it cannot pass. Fields keep out the wrong kind of content; the design still has to fit the longest of the right kind.

### Can I undo a change that went live?

**Yes.** The last 100 versions of each page are kept, and any of them can be restored.

