Hello,
I'm wondering if there's a way to set a character limit on copy coming through from a personalised piece of content so it can be truncated
For instance
<%= targetData.Description %> will return:
Lorem ipsum dolor sit amet, consectetur adipiscing elit
Where the ideal will be for it to return:
Lorem ipsum dolor sit amet ...
Any help would be appreciated
Solved! Go to Solution.
Views
Replies
Total Likes
You can use textarea max length (maxlength="50") this is in the HTML property best of HTML
You can add is CSS and can be utilized in all over HTML
@AndyHu1 where exactly you want to use it. If this is to display in email, there is other way around to achive it.
Views
Replies
Total Likes
Hi @ashish1212 , thanks for the reply
Yes this being used in an email, image example attached
Ideally I want to to do this in a the script as it may be needed elsewhere with a different character limit
Views
Replies
Total Likes
You can use textarea max length (maxlength="50") this is in the HTML property best of HTML
You can add is CSS and can be utilized in all over HTML
Thanks, that's probably the way I'll go for now. I'd like to have have various option on what comes after the truncated copy (ie [...] or see more link
Views
Replies
Total Likes
Hi @AndyHu1 ,
If you need to truncate after a specific number of character you can use slice.
If you need to truncate after a specific word then you need a combination of index and slice.
Thanks,
David
Views
Replies
Total Likes
Views
Likes
Replies