Truncating a rich text field
Permalink
Greetings fellow concrenauts! Earlier today wanted to truncate a text area attribute, and successfully did so via the text helper"
This is nice for non-styled text. But in my case, I've made this text area attribute a rich text area, and when shortening the text via the text helper shorten class, my text looses all its stylization.
Is there a way to shorten text without loosing the rich text stylization?
<?$th = Core::make('helper/text');?> <?=$th->shorten($textAreaAttribute, 500);?>
This is nice for non-styled text. But in my case, I've made this text area attribute a rich text area, and when shortening the text via the text helper shorten class, my text looses all its stylization.
Is there a way to shorten text without loosing the rich text stylization?
It would be extremely difficult to figure out where the starting an ending tags should go appropriately if you were going to try to keep the styling.