UNPKG

ngx-markdown

Version:

Angular library that uses marked to parse markdown to html combined with Prism.js for synthax highlights

80 lines (79 loc) 4.66 kB
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, TemplateRef, Type, ViewContainerRef } from '@angular/core'; import { KatexOptions } from './katex-options'; import { MarkdownService } from './markdown.service'; import { MermaidAPI } from './mermaid-options'; import * as i0 from "@angular/core"; export declare class MarkdownComponent implements OnChanges, AfterViewInit, OnDestroy { element: ElementRef<HTMLElement>; markdownService: MarkdownService; viewContainerRef: ViewContainerRef; protected static ngAcceptInputType_clipboard: boolean | ''; protected static ngAcceptInputType_emoji: boolean | ''; protected static ngAcceptInputType_katex: boolean | ''; protected static ngAcceptInputType_mermaid: boolean | ''; protected static ngAcceptInputType_lineHighlight: boolean | ''; protected static ngAcceptInputType_lineNumbers: boolean | ''; protected static ngAcceptInputType_commandLine: boolean | ''; data: string | null | undefined; src: string | null | undefined; get disableSanitizer(): boolean; set disableSanitizer(value: boolean); get inline(): boolean; set inline(value: boolean); get clipboard(): boolean; set clipboard(value: boolean); clipboardButtonComponent: Type<unknown> | undefined; clipboardButtonTemplate: TemplateRef<unknown> | undefined; get emoji(): boolean; set emoji(value: boolean); get katex(): boolean; set katex(value: boolean); katexOptions: KatexOptions | undefined; get mermaid(): boolean; set mermaid(value: boolean); mermaidOptions: MermaidAPI.MermaidConfig | undefined; get lineHighlight(): boolean; set lineHighlight(value: boolean); line: string | string[] | undefined; lineOffset: number | undefined; get lineNumbers(): boolean; set lineNumbers(value: boolean); start: number | undefined; get commandLine(): boolean; set commandLine(value: boolean); filterOutput: string | undefined; host: string | undefined; prompt: string | undefined; output: string | undefined; user: string | undefined; error: EventEmitter<string | Error>; load: EventEmitter<string>; ready: EventEmitter<void>; private _clipboard; private _commandLine; private _disableSanitizer; private _emoji; private _inline; private _katex; private _lineHighlight; private _lineNumbers; private _mermaid; private readonly destroyed$; constructor(element: ElementRef<HTMLElement>, markdownService: MarkdownService, viewContainerRef: ViewContainerRef); ngOnChanges(): void; loadContent(): void; ngAfterViewInit(): void; ngOnDestroy(): void; render(markdown: string, decodeHtml?: boolean): Promise<void>; private coerceBooleanProperty; private getClipboardOptions; private handleData; private handleSrc; private handleTransclusion; private handlePlugins; private setPluginClass; private setPluginOptions; private toLispCase; static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MarkdownComponent, "markdown, [markdown]", never, { "data": { "alias": "data"; "required": false; }; "src": { "alias": "src"; "required": false; }; "disableSanitizer": { "alias": "disableSanitizer"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; "clipboard": { "alias": "clipboard"; "required": false; }; "clipboardButtonComponent": { "alias": "clipboardButtonComponent"; "required": false; }; "clipboardButtonTemplate": { "alias": "clipboardButtonTemplate"; "required": false; }; "emoji": { "alias": "emoji"; "required": false; }; "katex": { "alias": "katex"; "required": false; }; "katexOptions": { "alias": "katexOptions"; "required": false; }; "mermaid": { "alias": "mermaid"; "required": false; }; "mermaidOptions": { "alias": "mermaidOptions"; "required": false; }; "lineHighlight": { "alias": "lineHighlight"; "required": false; }; "line": { "alias": "line"; "required": false; }; "lineOffset": { "alias": "lineOffset"; "required": false; }; "lineNumbers": { "alias": "lineNumbers"; "required": false; }; "start": { "alias": "start"; "required": false; }; "commandLine": { "alias": "commandLine"; "required": false; }; "filterOutput": { "alias": "filterOutput"; "required": false; }; "host": { "alias": "host"; "required": false; }; "prompt": { "alias": "prompt"; "required": false; }; "output": { "alias": "output"; "required": false; }; "user": { "alias": "user"; "required": false; }; }, { "error": "error"; "load": "load"; "ready": "ready"; }, never, ["*"], true, never>; }