UNPKG

ngx-highlightjs

Version:

Instant code highlighting, auto-detect language, super easy to use.

21 lines (20 loc) 841 B
import { EnvironmentProviders, InjectionToken } from '@angular/core'; import type { HLJSOptions } from 'highlight.js'; /** * Full documentation is available here https://highlightjs.readthedocs.io/en/latest/api.html */ export interface LineNumbersOptions { startFrom?: number; singleLine?: boolean; } export interface HighlightJSOptions { highlightOptions?: Partial<HLJSOptions>; lineNumbersOptions?: LineNumbersOptions; languages?: Record<string, () => Promise<unknown>>; coreLibraryLoader?: () => Promise<unknown>; fullLibraryLoader?: () => Promise<unknown>; lineNumbersLoader?: () => Promise<unknown>; themePath?: string; } export declare const HIGHLIGHT_OPTIONS: InjectionToken<HighlightJSOptions>; export declare function provideHighlightOptions(options: HighlightJSOptions): EnvironmentProviders;