Here on Stack Overflow, when we type in code in a specific format it will display it as code with syntax highlighting. I want to be able to do this on my website, however, I want to use the format that is on the Mozilla Developer Network!
I have seen this style of displaying code on many websites, but have been unable to figure out how they do it, and specifically how they allow ‘view plain’ and ‘print’ options.
I am assuming there is a plugin that I can use, but am lost as to where to find it.
Yes, it’s called SyntaxHighlighter. Depending on your website’s framework (is it a blog?) you can find several solutions to suit your needs. There are numerous plugins for WordPress that utilise SyntaxHighlighter, for instance. I was in the same situation a year ago and decided to make my own called Crayon. Note that Crayon doesn’t use SyntaxHighlighter, I built it from scratch, and that it uses server-side highlighting through PHP and uses JavaScript only for interactivity. SyntaxHighlighter uses only JavaScript and is client-side highlighting.