Nivel 1
Nivel 2
Iniciar sesión en la comunidad
Iniciar sesión para ver todas las insignias
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
¡Resuelto! Ir a solución.
Vistas
Respuestas
Total de me gusta
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
Vistas
Respuestas
Total de me gusta
@AndyHu1 where exactly you want to use it. If this is to display in email, there is other way around to achive it.
Vistas
Respuestas
Total de me gusta
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
Vistas
Respuestas
Total de me gusta
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
Vistas
Respuestas
Total de me gusta
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
Vistas
Respuestas
Total de me gusta
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
Vistas
Respuestas
Total de me gusta
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas