Modify Paragraphs summary field formatter to allow settings for length, ellipsis, etc. in manage display

Created on 30 November 2017, almost 7 years ago
Updated 2 October 2023, about 1 year ago

We thought it would be useful to allow config in the UI for the paragraphs summary field formatter to make use of the Unicode::truncate options:

public static Unicode::truncate($string, $max_length, $wordsafe = FALSE, $add_ellipsis = FALSE, $min_wordsafe_length = 1)

Especially to allow users to select a max length (character count). This is currently hard coded at 150 chars.

Another thought, not included in this patch, would be to include a select list of available paragraph types from which the user can choose what to exclude from the summary. Alternatively, we could provide our own view mode to use when rendering summaries?

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States costellofax Portland, ME

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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