# How can I use richText in custom component

**URL:** <https://forum.builder.io/t/how-can-i-use-richtext-in-custom-component/5107>\
**Category:** Technical Questions\
**Tags:** react, nextjs\
**Created:** [March 6, 2024, 8:36am UTC](https://forum.builder.io/t/how-can-i-use-richtext-in-custom-component/5107 "2024-03-06T08:36:12Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![order\_matters](https://avatars.discourse-cdn.com/v4/letter/o/b4bc9f/32.png) [@order\_matters](https://forum.builder.io/u/order_matters)\
**Post date:** [July 15, 2025, 9:26pm UTC](https://forum.builder.io/t/how-can-i-use-richtext-in-custom-component/5107/6 "2025-07-15T21:26:56Z")

</div>

Self-solved. I was building a FAQ component in React (JSX).

The richText input was for `answer`, I was passing it as a child `<div>{answer}</div>` and seeing

and   
 tags after editing…  
now I’m using dangerouslySetInnerHTML:  
`<div dangerouslySetInnerHTML={{ __html: answer }}></div>`

ChatGPT indicated this could work: `<RichText content={answer} />` but I didn’t see where RichText was exported anywhere.

I also just found this answer from a previous Identical thread:

> [@How do i use the Rich text/html prop?](https://forum.builder.io/t/how-do-i-use-the-rich-text-html-prop/4383):
>
> I have this component: export function Text({ label }) { return \<p\>{label}\</p\>; } Builder.registerComponent(Text, { name: 'Text', inputs: [{ name: 'text', type: 'html', },], }); The html is displayed as it is, with the tags. how do i render the html/richtext as text?

---

_[View the full topic](https://forum.builder.io/t/how-can-i-use-richtext-in-custom-component/5107)._
