# Error in the docs related to Structured Data?

**URL:** https://community.prismic.io/t/error-in-the-docs-related-to-structured-data/4622
**Category:** Developing with Prismic
**Tags:** reactjs
**Created:** [March 22, 2021, 12:07pm UTC](https://community.prismic.io/t/error-in-the-docs-related-to-structured-data/4622 "2021-03-22T12:07:39Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![kris](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kris](https://community.prismic.io/u/kris)
#### Post date: [March 22, 2021, 12:07pm UTC](https://community.prismic.io/t/error-in-the-docs-related-to-structured-data/4622/1 "2021-03-22T12:07:40Z")

</div>

Hello,

This might be error on my side, but I'm currently integration structured data into a React/Gatsby project.

I'm following this article: [How to add schema markup in Prismic - FAQs - Prismic People](https://user-guides.prismic.io/en/articles/4844729-add-schema-markup-in-cms-prismic)

In step 3, you have said that we need to render the RichText field as HTML using the RichText.render method. However if I do that, this output html in this format:

 ![Screenshot 2021-03-22 at 14.05.31](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/9/94df82f0807c467631c4302c3289adbd0400e34d.png)

My code for this is `{RichText.render(structuredScript.raw)}`

In order to actually render the script tag, we need to get the text value then wrap it in **dangerouslySetInnerHTML** tag

This worked for me:

```auto
<div dangerouslySetInnerHTML={{ __html: `${structuredScript.text}` }} />

```

Even though that this renders the script tag correctly, react Helmet unfortunately doesn't support dangerouslySetInnerHTML so this is not really a solution for us.

Any help will be greatly appreciated!

Thanks,  
Kris

---

<div class="post-metadata">

### Author: ![Levi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/levi/32/24_2.png) [@Levi](https://community.prismic.io/u/Levi)
#### Post date: [March 30, 2021, 9:14am UTC](https://community.prismic.io/t/error-in-the-docs-related-to-structured-data/4622/3 "2021-03-30T09:14:17Z")

</div>

Hi Kris,

I don't have a solution for you off the top of my head, but I did a little research and found a couple of possible solutions here:

> <https://github.com/nfl/react-helmet/issues/323#issuecomment-557819652>
>
> I have a page title with coded HTML entities that I would like to render as: “New Post”
> It's delivered to React...

I haven't tested it myself, but one person suggests using [react-html-parser](https://github.com/wrakky/react-html-parser).

Give that a try and let me know if it works for you 🙂

Cheers,  
Levi

---

<div class="post-metadata">

### Author: ![kris](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kris](https://community.prismic.io/u/kris)
#### Post date: [March 30, 2021, 9:27am UTC](https://community.prismic.io/t/error-in-the-docs-related-to-structured-data/4622/4 "2021-03-30T09:27:42Z")

</div>

Hi @Levi

I actually saw this and tried it, but it didn't work unfortunately.

After some thinking I did make it work by extracting only the JSON from the script (removing the script tags around it) then passing that JSON data to react-helmet.

Not the ideal solution, but it looks like it's working well!

This solution won't work if you want to pass any non-json code though.

I could help out updating that article if you need the help. Just give me a shout.

Cheers,  
Kris

---

<div class="post-metadata">

### Author: ![Levi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/levi/32/24_2.png) [@Levi](https://community.prismic.io/u/Levi)
#### Post date: [March 30, 2021, 10:18am UTC](https://community.prismic.io/t/error-in-the-docs-related-to-structured-data/4622/5 "2021-03-30T10:18:11Z")

</div>

@kris I'm glad that you were able to find a solution. We can get the article updated for anyone else using react-helmet.

But can you share a code snippet here showing what you did to get this working? It'll be very helpful for anyone else that finds this thread 🙂

---

<div class="post-metadata">

### Author: ![Levi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/levi/32/24_2.png) [@Levi](https://community.prismic.io/u/Levi)
#### Post date: [April 16, 2021, 1:31pm UTC](https://community.prismic.io/t/error-in-the-docs-related-to-structured-data/4622/8 "2021-04-16T13:31:53Z")

</div>

This issue has been closed due to inactivity. [Flag to reopen](https://community.prismic.io/t/re-open-a-thread/2175).

---

<div class="post-metadata">

### Author: ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)
#### Post date: [December 9, 2021, 4:22pm UTC](https://community.prismic.io/t/error-in-the-docs-related-to-structured-data/4622/9 "2021-12-09T16:22:24Z")

</div>



---

<div class="post-metadata">

### Author: ![Marving](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/marving/32/5259_2.png) [@Marving](https://community.prismic.io/u/Marving)
#### Post date: [November 19, 2022, 4:59pm UTC](https://community.prismic.io/t/error-in-the-docs-related-to-structured-data/4622/10 "2022-11-19T16:59:01Z")

</div>

Hello @Levi,

I am picking up on this topic as I am facing the same issue with Next js and dynamic structured data (blog post, FAQ, etc.): [Schema markup Prismic Next js - markup with multiples paragraphs (e.g FAQ) - #5 by Marving](https://community.prismic.io/t/schema-markup-prismic-next-js-markup-with-multiples-paragraphs-e-g-faq/11617/5)

If I may, I do also think the documentation need to be updated as it is not working for next js neither.

---

<div class="post-metadata">

### Author: ![kris](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kris](https://community.prismic.io/u/kris)
#### Post date: [November 19, 2022, 11:31pm UTC](https://community.prismic.io/t/error-in-the-docs-related-to-structured-data/4622/11 "2022-11-19T23:31:05Z")

</div>

Hey @Marving, I've written two articles which you might find useful

> **[Add FAQ structured data to your articles using Prismic and GatsbyJS | Prismic...](https://www.prismictemplates.com/blog/faq-structured-data-in-gatsby/)**
>
> FAQ schema can help your articles get featured in Google's FAQ section. Learn how to add FAQ structured data to your articles in your GatsbyJS application using Prismic fields.

> **[How to add Schema Markup to your Prismic React website | Prismic Templates](https://www.prismictemplates.com/blog/add-schema-markup-prismic-react-website/)**
>
> Learn how to set up your schema structured data fields on Prismic so your content writers can have the freedom to manage those on Prismic without a dev's help.

You can then use the free schema markup generators I created - [Schema Markup (Structured Data) JSON-LD Generators | SEO component](https://www.seocomponent.com/schema-markup-generator/)

Hope this helps!

---

<div class="post-metadata">

### Author: ![Marving](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/marving/32/5259_2.png) [@Marving](https://community.prismic.io/u/Marving)
#### Post date: [November 20, 2022, 12:20am UTC](https://community.prismic.io/t/error-in-the-docs-related-to-structured-data/4622/12 "2022-11-20T00:20:50Z")

</div>

Thanks man!

I have been able to find a way around: [Schema markup Prismic Next js - markup with multiples paragraphs (e.g FAQ) - #6 by Marving](https://community.prismic.io/t/schema-markup-prismic-next-js-markup-with-multiples-paragraphs-e-g-faq/11617/6)

Thanks 😁
