https://github.com/punktde/eel-htmlcrop
Neos Eel helper for cropping string html safe
https://github.com/punktde/eel-htmlcrop
eel neoscms
Last synced: about 1 month ago
JSON representation
Neos Eel helper for cropping string html safe
- Host: GitHub
- URL: https://github.com/punktde/eel-htmlcrop
- Owner: punktDe
- License: mit
- Created: 2019-01-14T10:50:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2026-05-20T11:52:42.000Z (2 months ago)
- Last Synced: 2026-05-20T16:06:12.650Z (2 months ago)
- Topics: eel, neoscms
- Language: PHP
- Size: 11.7 KB
- Stars: 1
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Neos Eel helper for HTML-safe string cropping
[](https://travis-ci.org/punktDe/eel-htmlcrop) [](https://packagist.org/packages/punktde/eel-htmlcrop) [](https://packagist.org/packages/punktde/eel-htmlcrop)
Currently the eelHelper uses [judev/php-htmltruncator](https://github.com/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 = '…')`