# Short text in repeater with '...'

**URL:** <https://forum.wixstudio.com/t/short-text-in-repeater-with/53068>\
**Category:** Ask the community\
**Tags:** code\
**Created:** [October 14, 2023, 7:06pm UTC](https://forum.wixstudio.com/t/short-text-in-repeater-with/53068 "2023-10-14T19:06:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luana\_F\_L\_Santos](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/luana_f_l_santos/32/83614_2.png) [@Luana\_F\_L\_Santos](https://forum.wixstudio.com/u/Luana_F_L_Santos)\
**Post date:** [October 14, 2023, 7:06pm UTC](https://forum.wixstudio.com/t/short-text-in-repeater-with/53068/1 "2023-10-14T19:06:19Z")

</div>

Hii  
I’m trying to make the text that appears on my website in the repeater part shorted (like a resume, with a specific number of words appearing and then ‘…’ ), but the code I’m using (I’ve already tried other ways), doesn’t work at all. I put it in normal text format, but in the Dataset is in a TAG format, I don’t know if that influences in anyway.

Code used:

$w.onReady(function () {

```
$w("#dynamicDataset").onReady(function () {

const shortTextLength = 10;
let fullText;
let shortText;

   $w("#repeater1").forEachItem(($w,item) => {

        fullText = $w('#dynamicDataset').getCurrentItem().answer;

        if (!fullText.length) {
            $w('#categoria').collapse();
        } else
        if (fullText.length <= shortTextLength) {
            $w('#categoria').text = fullText;

        } else {
            shortText = fullText.substr(0, shortTextLength) + "...";
            $w('#categoria').text = shortText;
        }

    })

});

```

});
