Currently the eelHelper uses judev/php-htmltruncator package to do the cropping.
This implementation might change in future versions.
Install the package:
composer require punktde/eel-htmlcrop
This package provides an Eel helper with the following methods:
-
HtmlCropping.cropAtWord(string $html, int $words, string $ellipsis = '…') -
HtmlCropping.cropAtCharacter(string $html, int $chars, string $ellipsis = '…')