Thanks to Wikipedia, I found CodeMirror , which is not only a syntax shortcut, but also a code editor. However, according to the following code demo , you can use it as a viewer.
It is written in Javascript and supports many languages โโ( full list here ).
source share