This project is not covered by Drupal’s security advisory policy.
Paragraphs in Text lets editors place one of a page's own paragraphs (a call to action, a quote, a slider, a chart…) at any spot inside its rich text, with a CKEditor 5 widget.
Without it, putting a block in the middle of an article means cutting the text into several text paragraphs around it. With it, the text stays one piece and the editor drops a card where the block should appear.
How it differs from embedding modules
The placed paragraph stays in its paragraph field. The text only holds a marker that points at it:
<placed-paragraph data-uuid="…"></placed-paragraph>So everything that works with paragraphs keeps working: revisions, content translation, the Paragraphs widget, search indexing, existing paragraph types. When the page is viewed, the paragraph renders at its marker instead of in its field, in the revision and language being viewed.
Features
- A "Place paragraph" button in CKEditor 5 lists the paragraphs of the open form, including ones added but not saved yet. Paragraphs already placed are marked ✓.
- In the editor, a placed paragraph is a card with its type and summary.
- A placed paragraph renders at its first marker only, and not in its field. Paragraphs that are not placed render as usual.
- A marker can only show a paragraph of the same entity. A marker whose paragraph was removed renders nothing; the editor shows its card as "not found" and saving the form warns about it.
- Enabled per paragraph field, with a list of paragraph types not offered (usually the text paragraphs themselves).
- Works with any fieldable entity (nodes, taxonomy terms, custom blocks…) and any formatted text field of the entity or of its paragraphs.
- Quick Node Clone integration: a clone's markers point at the clone's own paragraphs.
Post-installation
- Edit the paragraph field of a content type (Manage fields). Under Paragraphs in text, tick Paragraphs can be placed in the text and choose the paragraph types not offered.
- Add the Place paragraph button to the toolbar of the text format your texts use.
Requirements
- Drupal 10.3 or 11 with CKEditor 5
- Paragraphs with the "Paragraphs" (stable) widget
Limitations
- Top-level paragraphs of the entity only, not paragraphs nested inside other paragraphs.
- The legacy "Paragraphs Classic" widget and Layout Paragraphs are not supported yet.
- The marker is replaced when the entity is rendered; a text shown outside its entity (for example a Views field with the raw text) shows nothing there.
Similar projects
- Paragraphs entity embed and Paragraphs Inline Entity Form create the embedded paragraph from inside the editor and keep it in the text. Paragraphs in Text places paragraphs that already belong to the page, which stay in their field.
- Layout Paragraphs Split splits a text paragraph in two around a new one (Layout Paragraphs only).
Project information
- Project categories: Content display, Content editing experience
- Ecosystem: Paragraphs
- Created by morovinger on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.