Description of the need
People are often frustrated when they expect 600 characters of text, and get far fewer because their post contained an image, or other HTML. (source)
It's also frustrating when a text's trim length is quite short (e.g. 100 characters) and the first sentence is longer than this - this means that nothing gets output. (source)
Proposed solution
Field HTML Trim contains a function that truncates text - taking into account word boundaries, HTML trimming, ellipsis, etc. If we add this function to core, it'll mean we can trim text and ignore HTML tags (addressing the first problem), and trim to word boundaries instead of sentences or paragraphs (addressing the second problem).
Alternatives that have been considered
The Smart Trim module is another option, but it doesn't use the most robust method of truncating text. See https://github.com/backdrop/backdrop-issues/issues/599#issuecomment-1003... for a full explanation and comparison with Field HTML Trim.
Additional information
https://github.com/backdrop/backdrop-issues/issues/309 was opened to address the first problem originally. When the second problem was also pointed out in that issue, https://github.com/backdrop/backdrop-issues/issues/599 was then opened to address that separately.
As discussed in https://github.com/backdrop/backdrop-issues/issues/599#issuecomment-1019..., both of these issues can be fixed with the one function from Field HTML Trim. So trying to fix both separately isn't going to be ideal. This issue therefore deprecates and replaces both of those issues.
Draft of feature description for Press Release (1 paragraph at most)
Backdrop now includes the ability to truncate text while ignoring HTML tags and trimming to word boundaries.
Recent comments
This post explains how to do this in Drupal 7. In Backdrop, File Entity is already part of core. You will need to download and install module Views Field View. https://drupal.stackexchange...
I Need to Display an Image in a View that was Uploaded to a Webform
After alot of trials, i have done the obvious and translated the whole block for different languages with each property condition as follows: ->propertyCondition('langcode', 'en...
How to get the current page language?
Thanks so much! It's working now: I was able to transfer the docroot files to the containing directory without the need for a second database or any manual configuration export/import/sync...
Backup & Migrate Config: There was a problem creating field...database table with the name already exists.