Skip to content
SprecherEast
Issue 400

enhancement: Edit in place on the site for signed-in admins (toggle + Edit button)

Back to our plan
Open
enhancementfrontendcmsuxpriority: medium

Problem

Staff can only change content from /admin. The owner wants to edit right on the page when signed in as an admin, behind a toggle at the top of the page ("Edit in place" or similar) that turns editing on and off, like other CMSs he has used. Summary of his request (2026-10-25, Claude in Chrome session): when logged in as an admin he wants a button or, first, a toggle on the page that turns editing on or off, so components can be edited directly in the browser view of the site; and a toggle that lets signed-in admins edit pictures directly on the site. He asked to log it and address it when components are more modular and use the tokens (#146, #370), unless it is easy.

Proposed fix

Ladder findings so far (to be completed when the work starts):

  1. Native / already here: the site already renders Payload's official admin bar (@payloadcms/admin-bar, src/platform/ui/AdminBar.client.tsx), shown to staff only (#203). The layout passes it no document, so it never shows an "Edit post/page/event" link. Passing the current document's collection and id from each detail page is a small first step: an Edit button that opens that item in Admin. Payload's Live Preview (side-by-side, refreshes on autosave, #363) is the native way to see edits on the real page; it depends on #399.
  2. Official plugins: Payload has no official on-page (click-to-edit) visual editor as far as checked; confirm against the current docs before building.
  3. Open source: community projects exist (for example payload-visual-editor); check maintenance, Payload 3 support and fit before choosing.
  4. Our code: an "Edit in place" toggle in the admin bar that, when on, outlines editable blocks, text and images and opens each in an editor (a drawer with the Payload field, or inline for text), saving through Payload's API with the user's own access. This fits best after #146 (tokenized, modular components), since each component then has one place to hook editing into.

Suggested phases: (a) Edit link in the admin bar for posts, events and pages (small, can go first); (b) the toggle and per-component editing after #146.

Acceptance criteria

  • Not done: Signed-in staff see an Edit control on a post, event or page that opens that item in Admin; residents and visitors never see it
  • Not done: A toggle at the top of the page turns in-place editing on and off for admins
  • Not done: With it on, an admin can change a component's text and image on the page and save it as a draft, with Payload access rules applied
  • Not done: Works on a phone and with the keyboard; nothing changes for visitors
See it on GitHub, opens in a new tab