Text design lost when using "Show more" / "Show less" buttons in preview mode

Hello everybody! My name’s Ben.

I’ve been meaning to create a “News” section for my website, and to make it more browsable I’ve used Wix’s great tutorial on how to hide and collapse text with “Show more” and “Show less” buttons .

After fidgeting with the code I managed to get the result I wanted on my (unpublished) website’s page except for one thing: the design features of the text, which do show in editor mode, disappear in preview mode. More precisely, the features of the very first line are applied to the whole text, so that instead of having date, title and body neatly distinguished, everything appears in cyan size 14:

I thought it might be a similar problem with the situation described here , although I do not use datasets.

I did not do anything with the code besides duplicating it to make more than one “Show more”/“Show less” button for each news item. In fact the problem occurred before I did this.

I’ve also tried to reinitialize the formatting of the text elements but it doesn’t seem to help: if I ask Wix to show the first line in red color, the whole text will show up in red.

Any idea on how to solve this issue? :frowning:

Hi Ben! I am having EXACTLY the same problem… precisely as you describe it. I am befuddled! Have you found a fix or workaround yet? Please write back to update me on your situation. If you have found a solution, I would like to learn what it is… Many thanks and kind regards, Emily

Hey there Emily.

We haven’t found a solution yet unfortunately, but thank you for your feedback! Hopefully this will help give this issue greater visibility.

I’ll make sure to update this post if I find a fix or a workaround.

Best of luck!

Hi Benjamin,

I was able to fix Emily’s issues with this and many more things. Please contact me if you’d be interested in some help.

Warm regards,
David

Hi there, same here! Exact same problem too!

I will contact you David. Maybe also good to share the solution here for other people to find (if possible of course)?

Best,

Anneke