How import marked.js on CodePen

Tell us what’s happening:
I try to make a MArkdown editor on CodePen with, React, Marked.js and Prism.js
I imported them frome preferences but my code say
Uncaught TypeError: marked is not a function
You can check My Code Here


Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Build a Markdown Previewer

Link to the challenge:

Two things:

  • You don’t need to add import statements in your JS since you have added the libraries in the codepen JS settings. So get rid of those import statements at the top.
  • I believe you need to use an older version of marked to get this to pass the tests. Try using


Read the docs for the marked lib. You have to use marked.parse()

indeed with the old version it works thanks

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