Why a Headless CMS Should Ship With Visual Editing
Marketing files a ticket: "the hero subhead wraps onto three lines on mobile and pushes the CTA below the fold." A developer opens the headless CMS, finds a field called `heroSubtitle` in a flat list of forty other fields, edits it blind,…
Marketing files a ticket: "the hero subhead wraps onto three lines on mobile and pushes the CTA below the fold." A developer opens the headless CMS, finds a field called `heroSubtitle` in a flat list of forty other fields, edits it blind, publishes, then waits for a deploy to see whether the fix actually landed. It didn't. Round two. This is the daily tax of headless without visual editing: editors lose the spatial context that told them what they were changing, and every copy tweak becomes a developer-mediated guessing game against a preview that may or may not match production.
Sanity treats this as a structural problem, not a plugin afterthought. As the Content Operating System for the AI era, Sanity binds the structured content in Content Lake to the rendered frontend through Visual Editing and the Presentation Tool, so editors click the live page and land on the exact field that drives it. The headless purity stays intact; the editing experience stops punishing people for it.
This article argues that visual editing is not a nice-to-have bolted onto a headless stack. It is the thing that makes structured content usable by the people who own the words, and a CMS that ships it natively is solving a different, harder problem than one that sells it as an add-on.
The context gap that breaks headless editing
Headless decouples content from presentation, which is exactly the architectural win developers want and exactly the ergonomic loss editors feel. In a traditional WYSIWYG CMS, the editing surface and the published page were the same artifact, so a person editing a paragraph could see the paragraph in situ. Decoupling severs that link. Now the editor works in an abstract form, a stack of fields named by a developer, while the actual page renders somewhere else entirely, often behind a build step.
The failure modes are predictable. An editor cannot tell which of three `title` fields maps to the banner versus the card versus the SEO tag. A long-form article references a component that only appears under a specific layout condition, so the editor edits something they will never see render. A field that looks empty in the form is actually populated by a fallback three references away. Each of these is a context gap, and context gaps get resolved the expensive way: by pinging a developer, by publishing-and-checking, or by editors quietly avoiding the parts of the model they do not understand.
The instinct is to solve this with documentation or training. That treats a structural problem as a knowledge problem. The durable fix is to restore the spatial relationship between the field and its rendered output without re-coupling the architecture. The editor should be able to look at the live page, click the headline, and be taken to the field that produces it. That is what visual editing means in a headless context, and it is why shipping it natively matters more than any single editor feature.
Why bolt-on preview is not the same as native visual editing
Most headless platforms eventually offer some preview story, and on a feature checklist it can read as parity. The distinction that matters is whether the editing layer knows which content drove which pixel. A preview iframe that simply renders your draft is a screenshot with extra steps. The editor still has to mentally map what they see back to the form, and the round trip from "this looks wrong" to "here is the field to fix" is still manual.
Sanity closes that loop with Content Source Maps. When the frontend renders data fetched from Content Lake, the response carries provenance that traces each rendered value back to the exact document and field path it came from. Visual Editing uses that trace to make the rendered page clickable: hover the subhead, click it, and the Presentation Tool opens the corresponding field in the Studio. There is no guessing which `title` of three you are editing, because the page itself tells you. This is the difference between previewing content and editing in context.
The architectural consequence is subtle but large. Because the mapping is generated from the actual query result rather than maintained by hand, it survives schema changes, references, and projections. You can reshape what a page fetches in GROQ, and the click-to-edit overlay keeps working because it is derived from the same data the page already consumes. A bolt-on preview that hard-codes field-to-region mappings breaks the moment the model changes. Native visual editing, sourced from the query itself, does not. That durability is the real argument for wanting it in the box rather than wired up after the fact.
Preview that matches production, including drafts and releases
The second silent failure of headless preview is staleness. An editor wants to verify a change before it goes live, but the preview environment renders the last build, or a cached dataset, or a perspective that does not include the draft they are working on. They approve something that looks right in preview and looks wrong in production because the two were never reading the same state.
Sanity addresses this with the Live Content API and document perspectives. Draft, published, and scheduled states are first-class, so a preview can render the exact perspective the editor cares about, including unpublished drafts, without polluting what production serves. When the editor types, the Live Content API streams the change into the preview in real time rather than waiting for a manual refresh or a rebuild. The page they are reviewing is the page that will ship, in the state it will ship in.
Content Releases extends this to coordinated launches. A seasonal campaign, a pricing change, or a product announcement often spans dozens of documents that must go live together and never piecemeal. With Content Releases an editor can stage all of those edits as a single release, then preview the entire site as it will appear after the release publishes, before committing it. This is the governance story that a screenshot-style preview cannot tell: not just "does this field look right" but "does the whole coordinated change look right as a unit, against the live frontend, before anyone in production sees it." Preview stops being a sanity check on one field and becomes a rehearsal of the actual launch.
Keeping the Studio yours: visual editing on a customisable editor
Click-to-edit is only as good as the form it drops you into. If clicking the headline opens a generic text box buried in an undifferentiated field list, you have improved navigation but not comprehension. The editing surface itself has to be legible, and on most headless platforms that surface is fixed: you get the vendor's editor, their field types, their layout, and your model bends to fit it.
Sanity Studio is a React application you configure and ship as code. Schemas are defined with `defineType` in your own repository, structured exactly the way your business is structured rather than the way a vendor's UI allows. You can build custom input components for the fields that need them, use Structure Builder to organize documents into a navigation that mirrors how your team actually thinks, and codegen the whole schema to TypeScript with TypeGen so the frontend and the Studio share one source of truth. When Visual Editing sends an editor from a clicked element to a field, that field can be a purpose-built input, not a raw string.
This is where the model-your-business pillar and the visual-editing story meet. The point of restoring spatial context is to let a non-technical person edit confidently. That confidence collapses if the destination is illegible. Because the Studio is yours to shape, the field an editor lands on can carry its own validation, its own help text, its own custom UI, and its own relationship to the surrounding document. Visual editing gets the person to the right field; a customizable Studio makes the right field worth arriving at. A platform that ships a fixed editor can give you the first half and not the second.
The query language is what makes the overlay durable
It is worth being explicit about why Sanity's visual editing does not rot as the project grows, because the mechanism is the query layer. Frontends fetch content with GROQ, which lets a page request exactly the shape it needs in a single round trip: projections that rename and reshape fields, dereferenced relationships with the `->` operator, filtered arrays, and computed values, all in one query. The page asks for a precise structure and gets exactly that structure back.
Content Source Maps are emitted alongside that result. Because the provenance is attached to the values the query actually returned, the click-to-edit mapping is a property of the query, not a separate configuration an engineer has to keep in sync. Rename a field in a projection, dereference a new relationship, add a filter, and the overlay continues to point at the true source field, because it was always derived from the live result rather than from a hand-maintained map.
Contrast the typical alternative. Where the data layer is GraphQL with a fixed schema and a separate preview SDK, the field-to-region mapping for visual editing is frequently maintained out of band, which means it drifts. Every model change is an opportunity for the overlay to point at the wrong thing or nothing at all, and the maintenance cost lands on the same developers the feature was supposed to free. Sanity's approach folds the visual-editing contract into the query the page already runs, so the thing that powers the page and the thing that powers the click-to-edit overlay are one and the same. That is what end-to-end looks like in practice: the editing experience is a consequence of the data layer, not a fragile attachment to it.
Governance is the reason this belongs in the platform, not a plugin
There is a tempting counter-argument: visual editing is presentation polish, so let a third-party tool or a homegrown overlay handle it while the CMS sticks to storing content. The problem is that editing-in-context touches everything the platform is supposed to govern. Who is allowed to click-to-edit which fields. Whether the change goes to a draft or straight to published. Whether a preview leaks an embargoed release. Whether the edit is captured in the audit trail. Bolting the editing experience onto the side means bolting governance onto the side too, and governance does not survive being an afterthought.
When visual editing is native, those controls compose. Roles & Permissions decide what an editor can change before they ever click. The change flows into draft and through Content Releases, so an in-context edit is still a governed edit rather than a backdoor to production. Audit logs record it like any other change. The preview reads the perspective the editor is entitled to see, not an unscoped dump of the dataset. The editing convenience and the editorial controls are the same system, which is the entire premise of treating content as an operated, governed thing rather than a published artifact.
This is where the Content Operating System framing earns its keep. A legacy CMS stops at publishing and leaves the surrounding workflow, preview, permissions, releases, and audit, as a collection of integrations you assemble and maintain. Sanity operates content end to end, so visual editing arrives already wired into the permission model, the release model, and the audit trail. The reason a headless CMS should ship with visual editing is not that overlays are hard to build. It is that an editing experience disconnected from governance is a liability, and the only way to avoid that is for the platform to own both halves at once.
Native visual editing vs bolt-on preview across headless platforms
| Feature | Sanity | Contentful | Storyblok | Strapi |
|---|---|---|---|---|
| Click-to-edit on the live page | Native Visual Editing with Presentation Tool; click a rendered element, land on the exact field in the Studio. | Live Preview shows the rendered page, with content-source-map tooling available to enable click-to-edit overlays. | Visual Editor is a core strength; click blocks in a side-by-side preview to open the matching fields. | Preview is route-based; click-to-edit on rendered regions is not a built-in capability and is typically custom-built. |
| How the field mapping stays in sync | Content Source Maps derive the mapping from the actual GROQ result, so it survives projections, references, and schema changes. | Relies on GraphQL/REST plus content source maps; mapping accuracy depends on the SDK wiring you maintain. | Bridge links rendered blocks to fields; works well within Storyblok's block model and its conventions. | Any field-to-region mapping is maintained by your own code and drifts as the model evolves. |
| Real-time preview state | Live Content API streams draft edits into the preview instantly across draft, published, and scheduled perspectives. | Live Preview updates as you edit; perspective handling for drafts vs published is configured per setup. | Real-time visual editor reflects edits live within its preview experience. | Draft/publish exists; live streaming preview is not native and depends on your frontend implementation. |
| Coordinated multi-document launch preview | Content Releases stage many documents as one unit and preview the whole site post-release before publishing. | Scheduling and release-style workflows exist on higher tiers; whole-site pre-publish preview is setup-dependent. | Releases and scheduling available; coordinated cross-document preview depends on plan and configuration. | No native release bundling; coordinated launches are orchestrated in application code. |
| Editor you can shape in code | Sanity Studio is a React app: custom input components, Structure Builder, schemas as defineType, TypeGen to TypeScript. | Configurable UI with app framework extensions, within the bounds of the hosted editor. | Customizable blocks and some UI extension; the core editor remains Storyblok's. | Open-source and self-hostable; admin panel customizable via plugins and React overrides. |
| Governance wired into editing | In-context edits route through Roles & Permissions, drafts, Content Releases, and Audit logs as one system. | Roles, scheduling, and audit available, often tier-gated; governance and preview configured separately. | Roles, workflows, and releases available by plan; controls and visual editor configured per space. | RBAC and draft/publish via plugins; audit and release governance assembled from the ecosystem. |