Skip to content
Highlight.js Razor CSHTML language repository
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
test Import correct highligh.js Sep 1, 2019
.gitignore Initial commit Oct 8, 2018
.travis.yml travis Aug 7, 2019
package-lock.json Import correct highligh.js Sep 1, 2019
package.json 1.2.0 Sep 13, 2019

highlight.js syntax definition for Razor CSHTML.

For more about highlight.js, see

CSHTML is a markup language created by Microsoft for ASP.NET MVC and ASP.NET Core applications. It allows to create markup containing both C# and HTML code.

For more about the CSHTML Razor syntax here:


Simply include the highlight.js script package in your webpage or node app, load up this module and apply it to hljs.

If you're not using a build system and just want to embed this in your webpage:

<script src="/path/to/highlight.js/highlight.pack.js"></script>
<script src="/path/to/highlightjs-cshtml-razor/cshtml-razor.js"></script>
    hljs.registerLanguage('cshtml-razor', window.hljsDefineCshtmlRazor);

If you're using webpack / rollup / browserify / node:

var hljs = require('highlight.js');
var hljsDefineCshtmlRazor = require('highlightjs-cshtml-razor');



License: CC0-1.0

You can’t perform that action at this time.