UNPKG

ngx-markdown

Version:

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

21 lines (20 loc) 959 B
import { HttpClient } from '@angular/common/http'; import { DomSanitizer } from '@angular/platform-browser'; import { Renderer } from 'marked'; import { Observable } from 'rxjs'; import { MarkedOptions } from './marked-options'; export declare const errorSrcWithoutHttpClient = "[ngx-markdown] When using the [src] attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information"; export declare class MarkdownService { private platform; private http; private domSanitizer; options: MarkedOptions; renderer: Renderer; constructor(platform: Object, http: HttpClient, domSanitizer: DomSanitizer, options: MarkedOptions); compile(markdown: string, decodeHtml?: boolean, markedOptions?: MarkedOptions): string; getSource(src: string): Observable<string>; highlight(): void; private decodeHtml; private handleExtension; private precompile; }