Problem/Motivation

The current Mercury Editor Demo submodule no longer reflects modern Drupal and Mercury Editor best practices.

It was originally designed to scaffold example content types and configuration during module install
(partially via hook_install()), but this approach has several drawbacks:

  • It does not align with newer Drupal approaches such as Drupal Recipes.
  • The demo experience is limited and does not clearly showcase how Mercury Editor is intended to be used in a real project.
  • The configuration is harder to maintain and evolve.

As a result, developers evaluating Mercury Editor do not currently get a strong “out-of-the-box”
example of the editing experience.

Proposed resolution

Replace the existing demo implementation with a more modern approach:

1. Simplified demo module

The mercury_editor_demo module would primarily:

  • Enable required dependencies
  • Provide minimal glue configuration if needed
  • Point users to the demo recipe

2. Move demo scaffolding to a Drupal Recipe

All demo scaffolding (content types, fields, paragraphs, etc.) should move into a
Drupal Recipe, which would:

  • Create a sample Landing Page content type
  • Provide a Layout Paragraphs field
  • Include a few example paragraph/component types
  • Configure Mercury Editor appropriately
  • Optionally provide example layout templates or patterns

This aligns Mercury Editor with the emerging Drupal Recipes ecosystem and
keeps the demo configuration modular and reusable.

3. Optional example content

If useful, the recipe could include optional example content to demonstrate a complete
Mercury editing experience.

Benefits

  • Aligns Mercury Editor with modern Drupal Recipes workflows.
  • Removes the need for hook_install() scaffolding.
  • Provides a clearer out-of-the-box demonstration of Mercury Editor.
  • Makes the demo easier to maintain and extend.

Remaining tasks

  • Create a Mercury Editor demo recipe.
  • Move current demo scaffolding out of hook_install() into the recipe.
  • Simplify or replace the existing mercury_editor_demo module.
  • Update documentation to explain how to install the demo.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

philip_stier created an issue.

justin2pin made their first commit to this issue’s fork.