Home App Docs Blog Github

richText displays HTML tags in rendered content

I am using a component that takes the richText input type, and when I am managing the content of this input in the CMS, the HTML syntax is coming through, but the layout of the content isn’t. I don’t expect to see HTML tags rendered on the component in the visual editor, and I do expect it to have the layout as its displayed in the options tab. Here’s a screenshot:

Can I get help troubleshooting this issue?

Hey @rdonahue, would you send me the url for this content entry? When using the rich text editor in Builder, are you pasting content into the field or using the bullets button for your list items?

Thanks Kara, I found the problem! I needed to change my code to <p dangerouslySetInnerHTML={{ __html: mainContent }}></p>