Visual Editing
Adds click-to-edit overlays on draft frontend pages that open the matching field in the Payload admin form.
Installation
pnpm add @focus-reactive/payload-plugin-visual-editing About
This plugin connects a Next.js frontend to the Payload admin for visual editing. On the server, it adds hooks to every collection and global that are not skipped. When a draft is read for the frontend, the hooks embed invisible Vercel stega markers into string values, which record each field's path. The client overlay then scans the rendered DOM for those markers and draws an outline and an Edit badge on each editable element. Clicking a badge sends a postMessage to the admin, which focuses the matching field in the form. Enrichment only runs on draft reads made outside the admin. Published reads and the admin form itself are never touched. The frontend has to switch into draft mode through Next.js draftMode, and the README includes preview and exit routes for that. Collections need `versions: { drafts: true }`, and Live Preview has to point at the preview route. The plugin also registers a bridge provider in the admin, so the import map must be regenerated after config changes. A beforeChange hook strips intact markers from incoming writes so they never reach the database. The plugin takes several options: skipCollections, skipGlobals, excludeFieldNames, excludeValues (value-shape predicates such as URL, slug, hash, and ISO date), adminBasePath, and enrichment set to either 'auto' or 'explicit'. In explicit mode, reads must pass `context: { visualEditing: true }`. Text, textarea, and email fields are enriched automatically. richText and upload fields need the `withVisualEditingPath` helper from the client entry in the renderer, because their values are not stega-encoded inline. The package requires Payload 3.79 or newer and React 18 or 19, and Next.js is optional.
Package info
- Package name
@focus-reactive/payload-plugin-visual-editing- Latest version
1.1.0- Unpacked size
- 324 kB
- License
- MIT
- Weekly downloads
- 366
- Last publish
- Oct 5, 2026
More from focusreactive
View profileTranslator
Translates localized Payload CMS content into any locale via pluggable providers, with document, bulk-collection, and per-field controls in the admin UI.
Collaborative Comments
Adds document-level and field-level comments to the Payload admin panel, with @mentions, email notifications, resolution, multi-tenancy and locale filtering.
JSON Form Builder
Edits a Payload json field as real admin fields, with a drawer-based form builder and plain key-value output for the site.
A/B Testing
A/B testing plugin that creates page variants in Payload collections and routes traffic at the edge via Next.js middleware.
Create Ideal CMS
Interactive CLI that scaffolds a production-ready Payload CMS monorepo preconfigured with FocusReactive plugins.
Netlify Deploy
Adds a Publish button beside Save in Payload so editors can build, preview and publish a Netlify site from the admin.
Similar plugins
More in Contentonpage for TanStack Start
Adds on-page editing and draft previews to TanStack Start sites that read content from Payload.
On-Page React Editor
Adds an inline visual editor UI for Payload pages, with toolbars, field editors, and element annotations for React front ends.
OnPage for Next.js App Router
Adds inline editing and draft previews to Next.js App Router pages backed by Payload, with a sealed preview session and an OnPage component.
On-Page Editing
Adds inline on-page editing, draft preview links, and an admin button to edit Payload pages in place on a Next.js front end.
Lexical Inline Rich Text Editor
Adds click-to-edit inline rich text editing for Payload Lexical richText fields on the front end.