Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

368
Views
How do I use markdown-it without node.js?

I want to render Markdown with JavaScript using the markdown-it library from here: https://github.com/markdown-it/markdown-it

I included markdown it from the CDN with this:

<script type="text/javascript" src="https://cdn.jsdelivr.net/markdown-it/8.2.2/markdown-it.min.js"></script>

Then I followed the instructions in the README, here is the relevant part of my code:

var md = window.markdownit();
document.getElementByID("content").innerHTML = md.render("# Header");

However, it isn't working and I am getting this error in the console:

Uncaught TypeError: e.src is undefined
    exports https://cdn.jsdelivr.net/markdown-it/8.2.2/markdown-it.min.js:3
    process https://cdn.jsdelivr.net/markdown-it/8.2.2/markdown-it.min.js:2
    parse https://cdn.jsdelivr.net/markdown-it/8.2.2/markdown-it.min.js:2
    render https://cdn.jsdelivr.net/markdown-it/8.2.2/markdown-it.min.js:2
    <anonymous> http://localhost/script.js:110

How do I fix this issue?

EDIT: I decided to use markdown-js instead. I'm leaving this question in case it is useful for somebody else.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!