Documentation home
Documentation menu
A .NET wrapper around highlight.js. It runs the highlighter in Node.js and returns highlighted markup that uses the standard hljs class prefix.
Start here
TutorialsFind out what the library does and make the first call.
ChangelogRead the release history and version notes.
LicensesCheck the terms and third party notices.
Source codeBrowse the repository and issue tracker.
PackageView the published package.
ContactAsk a question or report a problem.
Install
dotnet add package Jering.Web.SyntaxHighlighters.HighlightJS
What it does
A .NET wrapper around highlight.js. It runs the highlighter in Node.js and returns highlighted markup that uses the standard hljs class prefix.
- Highlight source code with a highlight.js language alias.
- Set a custom class prefix when your styles require one.
- Validate language aliases before highlighting.
- Use dependency injection or the StaticHighlightJSService wrapper.
Requirements
| Target framework | .NET Standard 2.0 and .NET Framework 4.6.1 |
|---|---|
| Platforms | Windows and macOS |
| Prerequisite | Node.js 10.5.2 to 12.13.0 tested |
| Distribution | NuGet package |