Im trying to enter GitHub flavored markdown into the #editor element, so the text is rendered as HTML in the #preview element as I type.
But everything goes to shit when I edit this line of code to accomplish this:
const Previewer = ({ content }) => < div id = “preview”>{content}< /div>"
To this line of code:
const Previewer = ({ content }) => <div id = “preview” dangerouslySetInnerHTML = {{
__html: marked(content, { renderer: renderer })
}}>< /div>
When I make this edit, both the editor and previewer text boxes just disappear. And I go from 4/8 challenges complete back down to 1/8 complete.
What the deuce?
Here’s my link - https://codepen.io/highlander17/pen/KKoBWXy
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0
Challenge: Front End Development Libraries Projects - Build a Markdown Previewer
Link to the challenge: