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.

Community 0 1.2k/wk MIT v0.5.0

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 profile

Similar plugins

More in Content