Thank you very much for your code, it works very well. Question, if we would like to add a check whether the text length is shorter than the fullText or the text field is empty, where do you place them?
In this example, it does the check but I don’t know how to include them in your code.
https://support.wix.com/en/article/corvid-tutorial-creating-a-show-more-link
if (!fullText) { $w(‘#myTextElement’).collapse(); $w(‘#myButton’).collapse(); } else { // if the text has fewer or the same number of characters as shortTextLength characters, display it as is and collapse the “Show More” button if (fullText.length <= shortTextLength) { $w(‘#myTextElement’).text = fullText; $w(‘#myButton’).collapse(); } else { // create the shortened version of the text and display it in the text element shortText = fullText.substr(0, shortTextLength) + “…”; $w(‘#myTextElement’).text = shortText; } }