The following describes some syntax highlighting plug-ins implemented by pure javascript.
Http://www.webdesignbooth.com/9-useful-javascript-syntax-highlighting-scripts/.
1. SyntaxHighlighter
I believe that this plug-in is widely used. It supports many languages and supports custom syntax if it is not supported.
2. SHJS
SHJS is a representative of js syntax highlighting plug-ins. It supports many programming languages and is compatible with Firefox 2 & 3, IE 6 & 7, Opera 9.6, Safari 3.2 & Chrome 1.0.
3. beautyOfCode
BeautyOfCode is a jQuery-based syntax highlighting plug-in that uses the Alex Gorbatchev syntax highlighting script to bring it closer to the XHTML standard.
4. Chili
Chili is also a jQuery-based syntax highlighting plug-in that supports many languages and has many configuration options.
5. Lighter. js
Lighter. js is a free syntax highlighting plug-in based on MooTools, which is easy to use.
6. Highlight. js
Highlight. js is also easy to use and supports most languages. It has many plug-ins that can be integrated with CMS, forums, and blogs.
7. DlHighlight
DlHighlight is a simple highlight plug-in that only supports JavaScript, CSS, XML, and HTML.
8. Google Code pret.pdf
Google Code Prettify is a syntax highlighting plug-in produced by Google. It can highlight some Code snippets on html pages.
9. JUSH
JUSH is another jQuery syntax highlighting plug-in that supports HTML, CSS, PHP, PY, and SQL.