Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-highlight-js

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-highlight-js - npm Package Compare versions

Comparing version 13.0.0 to 14.0.0

index.d.ts

9

package.json
{
"name": "ngx-highlight-js",
"version": "13.0.0",
"version": "14.0.0",
"description": "Angular for syntax highlighting with highlight.js",

@@ -10,3 +10,4 @@ "keywords": [

"highlight-js",
"syntax highlighting"
"syntax highlighting",
"angular standalone library"
],

@@ -28,3 +29,3 @@ "author": "cipchk <cipchk@qq.com>",

"fesm2015": "fesm2015/ngx-highlight-js.mjs",
"typings": "ngx-highlight-js.d.ts",
"typings": "index.d.ts",
"exports": {

@@ -35,3 +36,3 @@ "./package.json": {

".": {
"types": "./ngx-highlight-js.d.ts",
"types": "./index.d.ts",
"esm2020": "./esm2020/ngx-highlight-js.mjs",

@@ -38,0 +39,0 @@ "es2020": "./fesm2020/ngx-highlight-js.mjs",

@@ -20,2 +20,15 @@ # ngx-highlight-js

### 2、Add highlight.js
Load the [highlight.js](https://highlightjs.org/download/) and theme css in page.
```html
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/styles/atom-one-dark.min.css" />
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.min.js"></script>
```
## Usage
**NgModule**
Import the `HighlightJsModule` in to your root `AppModule`.

@@ -33,13 +46,16 @@

### 2、Add highlight.js
**Standalone**
Load the [highlight.js](https://highlightjs.org/download/) and theme css in page.
```html
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js"></script>
```typescript
import { Component } from '@angular/core';
import { HighlightJsDirective } from 'ngx-highlight-js';
@Component({
selector: 'test',
template: `<textarea highlight-js [lang]="'bash'">npm install --save ngx-highlight-js</textarea>`,
standalone: true,
imports: [HighlightJsDirective],
})
export class SimpleComponent {}
```
## Usage
### Simple mode

@@ -46,0 +62,0 @@

@@ -1,2 +0,2 @@

import { ElementRef, OnDestroy, AfterViewInit } from '@angular/core';
import { ElementRef, OnDestroy, AfterViewInit, NgZone } from '@angular/core';
import { NgModel } from '@angular/forms';

@@ -9,2 +9,3 @@ import { HighlightJsConfig } from './highlight-js.config';

private doc;
private ngZone;
options: any;

@@ -18,3 +19,3 @@ lang: string;

private observer;
constructor(el: ElementRef<HTMLElement>, ngModel: NgModel, doc: any, cog: HighlightJsConfig);
constructor(el: ElementRef<HTMLElement>, ngModel: NgModel, doc: any, cog: HighlightJsConfig, ngZone: NgZone);
private escapeHTML;

@@ -27,4 +28,4 @@ private init;

private destroyMutation;
static ɵfac: i0.ɵɵFactoryDeclaration<HighlightJsDirective, [null, { optional: true; }, null, { optional: true; }]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<HighlightJsDirective, "[highlight-js]", ["highlightJs"], { "options": "options"; "lang": "lang"; "code": "code"; "mode": "mode"; }, {}, never>;
static ɵfac: i0.ɵɵFactoryDeclaration<HighlightJsDirective, [null, { optional: true; }, null, { optional: true; }, null]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<HighlightJsDirective, "[highlight-js]", ["highlightJs"], { "options": "options"; "lang": "lang"; "code": "code"; "mode": "mode"; }, {}, never, never, true>;
}
import * as i0 from "@angular/core";
import * as i1 from "./highlight-js.directive";
import * as i2 from "@angular/forms";
import * as i1 from "@angular/forms";
import * as i2 from "./highlight-js.directive";
export declare class HighlightJsModule {
static ɵfac: i0.ɵɵFactoryDeclaration<HighlightJsModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<HighlightJsModule, [typeof i1.HighlightJsDirective], [typeof i2.FormsModule], [typeof i1.HighlightJsDirective]>;
static ɵmod: i0.ɵɵNgModuleDeclaration<HighlightJsModule, never, [typeof i1.FormsModule, typeof i2.HighlightJsDirective], [typeof i2.HighlightJsDirective]>;
static ɵinj: i0.ɵɵInjectorDeclaration<HighlightJsModule>;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc