https://github.com/punktde/eel-htmlcrop
Neos Eel helper for cropping string html safe
https://github.com/punktde/eel-htmlcrop
eel neoscms
Last synced: 9 months 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-19T09:36:19.000Z (over 5 years ago)
- Last Synced: 2025-02-22T12:04:54.314Z (10 months ago)
- Topics: eel, neoscms
- Language: PHP
- Size: 10.7 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- 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 = '…')`