@cisstech/nge
Version:
NG Essentials is a collection of libraries for Angular developers.
41 lines (40 loc) • 1.97 kB
TypeScript
import { InjectionToken, Provider } from '@angular/core';
import { NgeMarkdownTransformer } from '../nge-markdown-transformer';
import { NgeMarkdownContribution } from '../nge-markdown-contribution';
import * as i0 from "@angular/core";
/** Custom options to pass to NgeMarkdownKatex contribution. */
export interface NgeMarkdownKatexOptions {
/** Base url to load katex scripts and styles. (default https://cdn.jsdelivr.net/npm/katex@0.15.1/dist) */
baseUrl?: string;
/** Options to pass to katex render function. https://katex.org/docs/options.html */
options?: Record<string, any>;
/** Katex extensions to include. https://katex.org/docs/libs.html */
extensions?: {
/** https://github.com/Khan/KaTeX/tree/master/contrib/mhchem (default to `true`) */
mhchem?: boolean;
/** https://github.com/Khan/KaTeX/tree/master/contrib/copy-tex (default to `true`) */
copyTex?: boolean;
};
}
/** Custom options to pass to NgeMarkdownKatex contribution. */
export declare const NGE_MARKDOWN_KATEX_OPTIONS: InjectionToken<NgeMarkdownKatexOptions>;
/**
* Contribution to render math expressions in markdown using [Katex](https://katex.org) library.
*/
export declare class NgeMarkdownKatex implements NgeMarkdownContribution {
private readonly options;
constructor(options: NgeMarkdownKatexOptions);
dependencies(): any;
contribute(transformer: NgeMarkdownTransformer): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgeMarkdownKatex, [{ optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<NgeMarkdownKatex>;
}
/**
* Provider to render math expressions in markdown using [Katex](https://katex.org) library.
*/
export declare const NgeMarkdownKatexProvider: Provider;
/**
* Provider to pass options to `NgeMarkdownKatex` contribution.
* @param options `NgeMarkdownKatex` options.
*/
export declare function NgeMarkdownKatexOptionsProvider(options: NgeMarkdownKatexOptions): Provider;