Add ability to trim at number of paragraphs

Created on 13 August 2013, over 11 years ago
Updated 27 September 2024, 4 months ago

A client requested to make smart_trim work with number of paragraphs instead of characters or words to have a neat output (without syllables for example). The client is using smart_trim because core's read more is always at the end of the complete teaser and not right behind the body text. So I made a simple patch to allow users to break text fields after a set number of paragraphs.
I am not sure if this functionality is already somehow available through core's text.module, so this patch may be redundant.

Please note: This patch was made for a system using CKEditor module and library. The patch only checks for paragraph tags <p>, leaving out everything outside these tags. Also, there's currently no fallback if there's no paragraph tag at all.

✨ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany broon Potsdam

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.

Production build 0.71.5 2024