How to limit length of displayed text?

I have a repeater that displays text (paragraphs) but I would like to limit the length of displayed text. I believe “maxLength” only works for textboxes and can’t be used in this case. Anybody mind sharing their insights on how to do it?

Instead of binding the text to a dataset, you can do that using some code.

Have the repeater connected to the dataset.

Implement the repeater onItemReady. In the function read from the dataset the current item, the fields from the item, limit the text length and set it to the text element.

Hi!

two things

A) could you implement this as a standard feature pleeeez

B) do you have a code example?

Here is an example code that you can put inside the onItemReady event of repeaters or outside of repeaters:

$item('#textElement').text = `${itemData.text.slice(0, 100)}`;

This code above will limit the length of text to max of 100 char. If you need something else you can ask or you can get help from AI bots.