Markdown Previewer Challenge -- Need Help plz!

I am building my Markdown Previewer for the FCC Certification project & I get stuck:(

When I try to pass the ‘placeholder’ as the default text in the #editor area, it did render in the #preview area. Yet when i try to type things in #editor, it just messed up and come up something with

which is totally wrong.
However, if I try to remove the placeholder & change this.state.htmlOutput back to “”, it could function and fulfill the test requirement#4. I just don’t know how to pass the “placeholder” correctly :’<

Could somebody guide me to pass in the placeholder text correctly, such that it could fulfill test requirement #4-6? (default text in #editor & successfully run in #preview) Many Thanks!!! :’(

my project link:

  1. You have HTML in the placeholder, it should be markdown. You do not write HTML in the editor, you write markdown. Copy the placeholder from the example project and use that.

  2. Move the call to DOMPurify.sanitize(marked(text)) down in the MarkdownOutput component and pass it the props instead DOMPurify.sanitize(marked(this.props.output))

  3. For the bonus test, you have to configure marked using the options.

1 Like

Thanks so much for your reply!! I changed it & it works!
Now i learnt that markdown is actually another language, silly me lolll