![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
highlightjs-cshtml-razor
Advanced tools
highlight.js syntax definition for ASP.NET Razor CSHTML language
CSHTML is a markup language created by Microsoft for ASP.NET MVC, ASP.NET Core and Blazor applications. It allows to create markup containing both C# and HTML code.
For more about the CSHTML Razor syntax here: https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor.
Simply include the Highlight.js
library in your webpage or Node app, then load this module.
Simply load the module after loading Highlight.js. You'll use the minified version found in the dist directory. This module is just a CDN build of the language, so it will register itself as the Javascript is loaded.
<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script type="text/javascript" src="/path/to/highlightjs-cshtml-razor/dist/cshtml-razor.min.js"></script>
<script>
hljs.highlightAll();
</script>
Add the following script tag in your page:
<script type="text/javascript" src="https://unpkg.com/highlightjs-cshtml-razor/dist/cshtml-razor.min.js"></script>
If you're using Node / Webpack / Rollup / Browserify, etc, simply require the language module, then register it with Highlight.js.
var hljs = require('highlightjs');
var hljsRazor = require('highlightjs-cshtml-razor');
hljs.registerLanguage("highlightjs-cshtml-razor", hljsRazor);
hljs.initHighlightingOnLoad();
FAQs
highlight.js syntax definition for ASP.NET Razor CSHTML language
The npm package highlightjs-cshtml-razor receives a total of 0 weekly downloads. As such, highlightjs-cshtml-razor popularity was classified as not popular.
We found that highlightjs-cshtml-razor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.