punktde/eel-htmlcrop
composer require punktde/eel-htmlcrop
Neos Eel helper for cropping string html safe
1.1.3
Neos Eel helper for cropping string html safe
- Requires
- neos/eel: *
- judev/php-htmltruncator: ^1.0
- Requires (dev)
- None
- Suggest
- None
- Provides
- None
- Conflicts
- None
- Replaces
- None
Neos Eel helper for HTML-safe string cropping
Currently the eelHelper uses judev/php-htmltruncator package to do the cropping.
This implementation might change in future versions.
Installation
Install the package:
composer require punktde/eel-htmlcrop
Usage
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 = '…')
The same vendor provides 30 package(s).