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
You need to tell react you’re setting the html yourself. You can do that with dangerouslySetInnerHTML.
dangerouslySetInnerHTML
<section className="right-section" id="preview" ref={(previewer)=>{ this.previewer_section=previewer; }} dangerouslySetInnerHTML={{ '__html': marked(this.props.contentValue)}} />
thank you ,I have stayed here a long time ,but __html should be without quotes .