Syntax Highlighting with HighlightJS

Question:
I wanted to add syntax highlighting to my code blocks but I can’t figure out how to use highlightjs
I also wanted to see if I could add a copy icon in the corner of each code block, kinda like in Replit comments, but I don’t know if that’s possible with highlightjs.
Repl link:
https://replit.com/@MiloCat/Syntax-Highlighting-Test

I recommend looking at How to use highlight.js and Getting highlight.js to add it to your project.

I do not know how to add a copy button.

3 Likes

Ok, I will try to do that, thanks!