You are here

content display

Truncated expanding text field with "show more" link in Drupal 8 & Twig

I've been working on a website with the requirement to truncate certain text fields—display the first several words of the text, with a "show more" link which on click, expands the rest of the text.

As I was under a very tight deadline, I found and implemented a jQuery plugin that did what I needed. Quick and easy.