Who this is for. Anyone weighing the shapes for a site whose editors will change content often, and the theme developer who has to keep editing working. After this page you can explain what in-context editing is worth and keep it working in your templates.

What editors get

Every record with revisions, pages, posts, book pages and the rest, has a Preview button in its editing form. It opens a pane beside the form showing the record as the site will show it, rendered through the site's own templates with the changes not yet saved. With the site setting Live preview: instant updates on, which is the default, the text in that pane can be edited in place: the editor clicks into a heading or a paragraph on the rendered page, types, and the text goes back into the matching field of the form, which saves it as a draft.

Separately, a signed-in backend user can open any versioned record's URL with ?revision= and a revision id to see that revision on the site itself. Neither preview is ever stored in the page cache.

What it is worth to a client

It is the difference between an editor fixing a typo in ten seconds, on the page where they saw it, and filing a ticket for a developer. Editors who can see the result before it is live are looking at the real template, not an approximation of it. No headless front end gets this for free; it is the item teams most often forget to put on the scales.

What a template has to do to keep it working

  • Print text through the area getters. Only text printed with getAreaHtml, and richtext printed with getAreaText, is editable in the pane. Text copied into a variable and reformatted on the way out still previews, but cannot be typed into.
  • Render content in the template, not in the browser. Scripts do not run in the preview unless the site setting Live preview: Allow JavaScript is on, and it is off by default. A part of the page that JavaScript draws is empty in the preview, which is one more reason to keep JavaScript for the per-visitor parts of a hybrid site and leave content to the template.
  • Keep area text out of HTML attributes where you can. The editable wrapper cannot sit inside an attribute, so text printed into one is not editable in place.

Patterns, live preview and governance in Guide 4 covers the mechanics, and In-context editing stopped working on one field the usual causes when it breaks.

What a headless build keeps

Preview, but not editing in place. The site setting Alternative live preview url makes the admin save a draft and load a route of your front end in the preview pane instead of rendering the record itself (Preview without a public URL). That pane shows your rendering, read-only: the editable text is something the platform's own rendering adds, and a page rendered elsewhere does not have it.