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
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
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.
表示
返信
いいね!の合計
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
表示
返信
いいね!の合計
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
表示
返信
いいね!の合計
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
表示
返信
いいね!の合計