You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: