This module allows you to filter & trim the rendered output of Paragraphs fields. Also supports using a separate field as a summary when available instead of trimming.
Usage
- After installing the module, there will be a new "Paragraphs Trimmed" formatter available for Paragraphs fields on "Manager Display" pages.
- Select a View Mode to render the Paragraphs
- Select a Text Format for the rendered output and a trim length. (If you need to strip certain html tags or any other text processing you can create a new Text Format for it)
- If you have the Smart Trim module enabled, you can enable the "Paragraphs Smart Trim" module to access a Smart Trim field formatter for Paragraphs fields.
- You can also select any other field on the entity to use as a summary instead of trimming when it has a value. This is similar to the "Summary or Trimmed" formatter for text fields with summaries.
How it works
The idea is that we want to render our entire Paragraphs field's html output as though it was entered in a regular text field (e.g. through a WYSIWYG or whatever). The process pipeline looks like:
- Render the Paragraphs field as raw markup
- Assign the rendered markup a text format
- Render the markup using a regular text field formatter
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.Maintenance fixes only
Considered feature-complete by its maintainers.- Project categories: Content display
342 sites report using this module
- Created by drclaw on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
8.x-2.1
released 10 March 2023
Works with Drupal: ^8 || ^9 || ^10
Install:
Development version: 8.x-2.x-dev updated 10 Mar 2023 at 20:59 UTC
