Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

370
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda