Allow configuring HTML elements to remove from the summary including their contents

Created on 15 July 2021, almost 3 years ago
Updated 18 April 2024, 2 months ago

Problem/Motivation

Recently i wanted to remove headlines from a teasers display mode.

Proposed resolution

I think it might be useful to make the stripped HTML elements configurable.

Remaining tasks

Review the patch. Backport to D7?. Replace #states: #3194975: Settings form '#states' values only work on fields named 'body' β†’ ( https://www.drupal.org/project/smart_trim/issues/319497 β†’ )

User interface changes

A new field that allows the user to specify the HTML tags.

API changes

This patch replaces the changes made in #3194986: Javascript appearing when HTML is being stripped β†’ ( https://www.drupal.org/project/smart_trim/issues/3194986 β†’ ). These tags have been set as the new default setting.

✨ Feature request
Status

RTBC

Version

2.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    What if we change the approach to use xpath to filter items?

    That would allow us to target more specific elements to keep/discard.

  • Status changed to RTBC 2 months ago
  • Hi all,

    I've tested the patch in #11 on Drupal version 10.2.5 for Smart Trim version 2.1.1. The patch was applied successfully.
    The strip HTML elements functionality is working fine, it removes the defined element with its content.

    Thanks for your contributions.

Production build 0.69.0 2024