Roi thank you for information I really appreciate
Here is link https://yingyumiao.wixsite.com/website-7
same repeater in page 1 and page 2
Page 2 without page code
Page 1 with page code below
let fullText; // variable to hold the full text
let shortText; // variable to hold the short version of the text
$w.onReady( function () {
$w(“#dataset1”).onReady( function () {
// how many characters to include in the shortened version
const shortTextLength = 40;
// set the fullText variable to be the text from the collection
fullText = $w(‘#dataset1’).getCurrentItem().html;
// if no text to display, collapse the text element and the button
if (!fullText) {
$w(‘#text27’).collapse();
$w(‘#button3’).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(‘#text27’).text = fullText;
$w(‘#button3’).collapse();
} else {
// create the shortened version of the text and display it in the text element
shortText = fullText.substr(0, shortTextLength) + “…”;
$w(‘#text27’).text = shortText;
}
}
});
//TODO: write your page related code here…
});
export function button3_click(event, $w) {
if ($w(“#text27”).text === shortText) {
// if currently displaying short text, display the full text
$w(“#text27”).text = fullText;
$w(“#button3”).label = “Show less”;
} else {
// if currently displaying full text, display the short text
$w(“#text27”).text = shortText;
$w(“#button3”).label = “Show more”;
}
//Add your code for this event here:
}
Notice: Repeater title and picture not setup link to Dataset
text27
button3

