Front End Development Libraries Projects - Build a Markdown Previewer

Tell us what’s happening:

Hi everyone,

I’m struggling with the final mandatory test “When my markdown previewer first loads, the default markdown in the #editor field should be rendered as HTML in the #preview element” Why isn’t it considered rendered as HTML in the preview element? It is HTML, it is rendering, and it is rendering from the #preview element…

Also, less important, is there a reason why my image at the end is not rendering? The test asking for an image passes so it must recognize I’ve got an image in there, have I not entered the URL properly?

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Challenge: Front End Development Libraries Projects - Build a Markdown Previewer

Link to the challenge:

Hey @tdoherty92 ,

I think the problem is in its initial state. I switched to another markdown example and it worked.

I used my initial state as an example to test and it passed, if you want you can take a look:https://codepen.io/leandroSmS/pen/LYgvpJM

To solve the last bonus test it is good to take a look at this part of the documentation:
https://marked.js.org/using_advanced#options

Hope its works!

When i use chrome developer tool (F12) to examine freecodecamp sample : https://markdown-previewer.freecodecamp.rocks/

I found there is a <pre> element in preview window.

Try copy that section and insert into your own initial state?

Thank you @leandroSmS you’re right. I just copy-pasted your markdown into my state and it worked. So now I’m wondering what pieces of my markdown are making the initial state not work! But thank you for the guidance.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.