Ask coding questions

← Back to all posts
How do I load GitHub's Markdown parser into my HTML file so I can use it in my web page?
ZacharyRude (7)

I can't find GitHub's Markdown parser on cdnjs, and Unpkg (unlike cdnjs) does NOT work very well AT ALL on Replit (unlike with cdnjs, I get a script error in the console when I load a file from Unpkg, but it doesn't happen with cdnjs), so how will I be able to load the Markdown parser that GitHub uses into an HTML file?

Answered by Coder100 (18893) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (18893)

are you using this? http://showdownjs.com/
try this:
https://cdnjs.com/libraries/showdown

also unpkg is not super easy to use -- as it uses an npm environment, so sometimes extra configuration is needed.

ZacharyRude (7)

@Coder100 Well, that one doesn't have syntax highlighting for full code snippets, and there is no button that copies the code snippet's text to the computer's clipboard, but those features are in GitHub's Markdown parser, so how do I add those features to Showdown.js?

Coder100 (18893)

well
the thing is
that's not part of the parser

the syntax highlighting you can implement yourself with highlight.js maybe

and the copy text to the computer .... all of these are things you can do with js!! @ZacharyRude