
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
ngx-highlight-js
Advanced tools
Angular for syntax highlighting with highlight.js
npm install --save ngx-highlight-js
Import the HighlightJsModule
in to your root AppModule
.
import { HighlightJsModule } from 'ngx-highlight-js';
@NgModule({
imports: [ HighlightJsModule ],
bootstrap: [AppComponent]
})
export class AppModule {
}
Load the highlight.js and theme css in page.
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/atom-one-dark.min.css">
<textarea>
Tag<textarea highlight-js [options]="{}" [lang]="'typescript'">
/* tslint:disable */
import { Component } from '@angular/core';
@Component({
selector: 'demo',
templateUrl: './demo.component.html',
styleUrls: ['./demo.component.scss']
})
export class DemoComponent {
switchStatus: boolean = true;
}
</textarea>
[options] equar configure(options). (optional)
[lang] uses language detection by default but you can specify the language. (optional)
Please follow this guidelines when reporting bugs and feature requests:
Thanks for understanding!
The MIT License (see the LICENSE file for the full text)
FAQs
Angular for syntax highlighting with highlight.js
The npm package ngx-highlight-js receives a total of 2,212 weekly downloads. As such, ngx-highlight-js popularity was classified as popular.
We found that ngx-highlight-js demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.