Paragraph types

Embed Paragraphs directly in CKEditor 5

Let editors drop a Paragraph straight into a rich-text field. Pick a Paragraph
type in the CKEditor 5 toolbar, fill in its form, and it appears inline in the
body — no separate field, no leaving the editor.

Works with the Paragraph types you already have, on Drupal 10.3 and Drupal 11.

Why you might want this

  • Content sits where it reads. A gallery, a quote or an
    embedded video goes in the middle of the article, not in a Paragraphs field
    below it.
  • No new content model. It uses the native Paragraph entity,
    so your existing Paragraph types, fields and view modes work unchanged.
  • Mostly configuration. The picker is an
    Entity Browser and
    the embedding is
    Entity Embed, both
    of which you can adjust in the UI.
  • Small surface area. It extends
    Inline Entity
    Form
    rather than reimplementing it, so there is very little custom code
    to audit.

See it working in two minutes

Enable the paragraphs_inline_entity_form_example submodule. It
ships a content type, a text format with the button already on the toolbar, and
nine ready-made Paragraph types — text, image, gallery, YouTube, Twitter,
Facebook, Instagram, columns and a view. Add a node of that type and the whole
flow is there with nothing to configure.

How it compares to Paragraphs Entity Embed

This module Paragraphs
Entity Embed
Paragraph entity Native Paragraphs entity Its own entity type
Existing Paragraph types Work as they are Need to be recreated
Picker Entity Browser, configurable Custom
Custom code Minimal More

Requirements

Installation

  1. composer require drupal/paragraphs_inline_entity_form, then
    enable the module.
  2. At /admin/config/content/embed, edit the
    Paragraphs embed button and choose which Paragraph types
    editors may embed.
  3. At /admin/config/content/formats, add the
    Paragraphs button to the CKEditor 5 toolbar and enable the
    Display embedded entities filter.
  4. Make sure the embed markup is permitted in Allowed HTML
    tags
    . The example module's text format shows a working set.

Known limitations

  • Nested Paragraphs are not supported, and there is a known conflict with
    Bootstrap Paragraphs involving the language field when a Column Paragraph
    has children.
  • Drupal 12 is not usable yet. The module's own code passes its tests on
    Drupal 12, but several dependencies have no Drupal 12 release.

Contributing

Issues and merge requests are welcome in the issue queue. The module has a
functional and unit test suite that runs against current and next-minor core on
every push.

Supporting organizations: 
Sponsored development
Support and development
Support and development

Project information

Releases