Highlight.js Highlights Syntax for 51 Languages with 20 Style Themes
Join the DZone community and get the full member experience.
Join For Free
highlight. js
highlights syntax in code examples on blogs, forums and in fact on any
web pages. it's very easy to use because it works automatically: finds
blocks of code, detects a language, highlights it.
this is not only convenient but also allows highlighting for code examples marked up with writing syntaxes like markdown where there is no way to specify html class easily.
the library knows 51 languages and is bundled with 20 style themes. the library now works not only in a browser but also with node.js. it is installable with npm install highlight.js .
it also a new unique feature (apparently) among syntax highlighters which is highlighting http headers and an arbitrary language in the request body. the most useful languages here are xml and json both of which highlight.js does support.
you might also be interested in rainbow - a code syntax highlighting library written in javascript .
requirements : none
demo : http:/ / softwaremaniacs. org/ media/ soft/ highlight/ test. html
license : bsd license
this is not only convenient but also allows highlighting for code examples marked up with writing syntaxes like markdown where there is no way to specify html class easily.
the library knows 51 languages and is bundled with 20 style themes. the library now works not only in a browser but also with node.js. it is installable with npm install highlight.js .
it also a new unique feature (apparently) among syntax highlighters which is highlighting http headers and an arbitrary language in the request body. the most useful languages here are xml and json both of which highlight.js does support.
you might also be interested in rainbow - a code syntax highlighting library written in javascript .

requirements : none
demo : http:/ / softwaremaniacs. org/ media/ soft/ highlight/ test. html
license : bsd license
Syntax (programming languages)
Published at DZone with permission of Hirvesh Munogee, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments