Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Expand Collapse Formatter

Security covered Under active development 9,266 sites

This module allows you to add a "show more/show less" toggle to long text fields. It provides a configurable formatter that can be applied to text fields to truncate content and reveal it upon clicking a link.

This is a simple module to expand or collapse long texts by clicking on a "show more/show less" link. It provides a configurable formatter which can be attached to each text area field of an entity.

The following field types accept this formatter:

  • "text_long",
  • "string_long",
  • "text_with_summary",
  • "text_long_with_summary"

Configuration

  1. After enabling this module, navigate to your entity type's "manage display" tab.
  2. Choose the "Expand collapse formatter"
  3. Adjust the settings using the gear icon. You can change the "trim length",
  4. "default state", open and close text, and the classes used for each action.
  5. Click "Update" to save these settings and then remember to click "Save" at the
  6. bottom of the page.

After these steps, you should see the "read more" link at the bottom of the
fields with this formatter, so long as they contain more characters than the
trim length.

Drupal 8–11

Ask your assistant about Expand Collapse Formatter

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

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Mar 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
2.0.3 Stable 8–11 Aug 13, 2024
2.0.2 Stable 8–10 Mar 14, 2023
2.0.x-dev Dev 8–11 Mar 8, 2023