Trying to make my markdown previewer

Still not sure what I’m doing wrong. I can make my input appear on the output, and I can make markdown HTML appear in the output, but I haven’t figured out the ‘setInnerHTML’ deal that will make the markdown appear correctly. whenever I put the ‘dangerouslySetInnerHTML’ in, it blanks out the whole page.

so I finally got it fixed. not exactly sure why my function was acting up, but I could make the html inline just as well
<div className="outputText" dangerouslySetInnerHTML={{__html: marked(this.props.input)}} > </div>

1 Like