html-react-parser
html-react-parser copied to clipboard
Replace head with next/head
Heya!
I'm trying to parse HTML into a nextjs component.
I have
const parsedHTML = parse(props.html,{
replace: domNode => {
if(domNode.name == 'head'){
return <Head>{domNode.children}</Head>
}
Which promptly explodes(it doesn't copy the content into Head) - what's the correct way to do this please?
What is your error and can you provide a reproducible example @marcfielding1? You can use the next example
Closing issue due to lack of activity. Feel free to reopen if you have additional questions.