Hello, I created a dynamic page, in this dynamic page I connected a rich text d ema database to a text box and I added to this text box I added a "show more" so the data is imported directly from the console of wix code the problem it is when i visualize the rendering the html tags is displayed with the text. How to display my text box without the tag and formatting html. ?
My code :
let fullText; // variable to hold the full text let shortText; // variable to hold the short version of the text $w.onReady(function () { $w("#dynamicDataset").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('#dynamicDataset').getCurrentItem().details; // if no text to display, collapse the text element and the button if (!fullText) { $w('#text19').collapse(); $w('#button2').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('#text19').text = fullText; $w('#button2').collapse(); } else { // create the shortened version of the text and display it in the text element shortText = fullText.substr(0, shortTextLength) + "..."; $w('#text19').text = shortText; } } });