Hello and thanks in advance for your help! I am new to coding and I have a question with a probably very simple solution.
I have a text box linked to a dataset rich text field and I want to have a button “show more, show less text”.
I followed the instructions in this link and it works but as I have a formatted rich text what appears in the screen is the code for the formatting of that text... What can I do to display the content I wrote (with the right formatting). Thanks!!
Instructions followed: https://support.wix.com/en/article/wix-code-tutorial-creating-a-show-more-link
Thank you!
You need to either create two versions of your formatted text (this is the simplest approach if you need text formatted). If you don’t do this you will need to parse the html in the long version of formatted text and make sure you don’t lose important html tags when you truncate the string (</p> or </style> for example). Also rich text needs to be assigned to the .html property and not the .text property of the text element. Good luck.