Markdown code is converted to html tags

Markdown code is converted to html tags
0

#1

I don’t know what should I do to get red of this issue
when I type on the textarea the preview section on the right side get updated but the markdown is converted to html tags .
please I need help ,here is my codepen link:


and also the link of the challenge :
https://learn.freecodecamp.org/front-end-libraries/front-end-libraries-projects/build-a-markdown-previewer


#2

You need to tell react you’re setting the html yourself. You can do that with dangerouslySetInnerHTML.

<section
        className="right-section"
        id="preview"
        ref={(previewer)=>{ this.previewer_section=previewer; }}
        dangerouslySetInnerHTML={{ '__html': marked(this.props.contentValue)}}
      />

#3

thank you ,I have stayed here a long time ,but __html should be without quotes .