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:
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.
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.