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.
Installation
pnpm add @payload-onpage/plugin About
This plugin adds on-page editing to Payload 3 for collections and globals you list in the `collections` and `globals` options. Editors click text on the rendered front end, type, and the change saves as a draft. The plugin adds endpoints for entering edit mode, switching modes, exiting, and generating preview links, all of which need a `session` adapter. The Next.js adapter from `@payload-onpage/next/session` is the documented one. Saves from the editor go through Payload's REST API, not a side channel. Access control, hooks, validation, drafts, and versions apply the same way they do for any other write. The plugin reads each document through `docAccessOperation` to decide who can edit it. It also adds marker hooks that strip editor metadata before validation and save, and a stale-write guard that rejects a save when the document changed after the editor loaded it. In the admin, the plugin adds an "Edit on page" button and a "Copy preview link" control to each enabled document. Options include `fields` and `url` per document, `access`, `encode`, `previewLinkTTL`, `validatePreviewLink`, `secret`, `authCookie`, `routePrefix`, and `enabled`. If `serverURL` is unset in production, the plugin logs a warning, because redirects, preview links, and Secure cookies need the public origin.
Package info
- Package name
@payload-onpage/plugin- Latest version
0.5.0- Unpacked size
- 173 kB
- License
- MIT
- Weekly downloads
- 1.2k
- Last publish
- Oct 12, 2026
More from jellologic
View profileonpage 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.
Lexical Inline Rich Text Editor
Adds click-to-edit inline rich text editing for Payload Lexical richText fields on the front end.
Similar plugins
More in ContentCollaborative Comments
Adds document-level and field-level comments to the Payload admin panel, with @mentions, email notifications, resolution, multi-tenancy and locale filtering.
SEO JSON-LD Structured Data
Builds Schema.org JSON-LD for products, breadcrumbs, carousels, site search and organization data in Payload e-commerce sites.