Part of the Paragraphs ecosystem · 87 projects
This module provides a formatter for Paragraphs fields that allows you to trim the rendered output. You can also configure it to use a separate field as a summary when available, instead of trimming.
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
Ask your assistant about Paragraphs Trimmed
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
- Paragraphs
- filter Drupal core
- text Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Paragraphs ecosystem
Most installed first