Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Headless Frontend Editing

No security coverage Under active development

Headless Frontend Editing brings in-place editing to decoupled (headless) sites. The node's View tab shows your real frontend, for example Next.js, in an iframe. Editors hover or focus a section, a field or the whole page and edit it in a sidebar that holds the normal Drupal form. After saving, the preview and the frontend cache are refreshed.

Your frontend keeps rendering itself. Drupal supplies only a small overlay script, the forms and the access checks, so no markup or design is duplicated in Drupal. This module is not related to Frontend Editing, which needs pages rendered by Drupal.

Features

  • Edit whole entities, single fields or (with the submodule) Paragraphs sections, in any language.
  • Live preview while typing, for rich text and other fields.
  • Read-only, short-lived preview tokens, so the frontend can show unpublished content and revisions.
  • A floating editor bar above the preview with "Edit page" and "Page layout". Modules can add their own tools with hook_headless_frontend_editing_tools_alter().
  • On-demand revalidation of the frontend after content changes, with a shared secret.
  • Keyboard support: Alt+Enter moves focus to the toolbar, Escape closes the sidebar and asks before discarding changes.
  • A save confirmation after every save, move or delete.

The submodule Headless Frontend Editing Paragraphs adds, moves and deletes Paragraphs sections from the preview, and adds a "Page layout" view to reorder sections by dragging. The preview shows each new order before it is saved.

Security

  • Every action is checked on the server: entity update access, field edit access, the root entity of Paragraphs, content moderation transitions and CSRF tokens.
  • Preview tokens are HMAC-signed, expire after 10 minutes and are read-only: GraphQL mutations and JSON:API writes are refused or handled as anonymous.
  • Responses to token requests are never cached for other users.
  • All messages between Drupal and the frontend are checked on origin, source and protocol version.

Requirements

  • Drupal 11.4 or newer (Drupal 12 supported), PHP 8.3 or newer.
  • A GraphQL (for example GraphQL Compose) or JSON:API endpoint that your frontend reads from.
  • Paragraphs, only for the submodule.

Installation and configuration

  1. Install with Composer: composer require drupal/headless_frontend_editing, then enable the module.
  2. Grant use headless frontend editing to editors.
  3. Set the frontend URLs, preview path and content types at Configuration » Web services » Headless Frontend Editing.
  4. Add the revalidation secret to settings.php: $settings['headless_frontend_editing_revalidate_secret'].
  5. On the frontend, add a preview route, mark editable elements with data-hfe attributes and load the client script in edit mode. The README and docs/protocol.md describe the full contract, and examples/nextjs contains a working sketch for Next.js.

Similar projects

  • Frontend Editing: in-place editing for pages rendered by Drupal itself.
  • Next.js: preview and revalidation for Next.js, without in-place editing. Both modules can be used together; leave the revalidate path of this module empty if Next.js already revalidates.

Ask your assistant about Headless Frontend Editing

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Nov 2026
Latest release
16 minutes ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.0-beta2 Pre-release 11 PHP >=8.3 Nov 16, 2026
1.0.0-beta2 Pre-release 10 PHP >=8.3 Nov 16, 2026
2.0.0-beta1 Pre-release 11 PHP >=8.3 Nov 16, 2026
1.0.0-beta1 Pre-release 11 PHP >=8.3 Nov 15, 2026