Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to be able to limit output by number of characters #30

Open
lenchantin opened this issue Oct 9, 2022 · 0 comments
Open

Comments

@lenchantin
Copy link

I'd like to be able to limit the output to a specific number of characters while retaining JSON or HTML. For instance, I'd like to be able to limit the characters output to 50 without risking cutting off an HTML end tag if it cuts in the middle of a word. Maybe something like $output->getHTML()->limit(50, '...') - with the first value being number of characters, and second being what you'd append to the end of the string should it cut off any characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant