UNPKG

ngx-showdown

Version:

A Angular (>=2) integration for Showdown

41 lines (40 loc) 1.2 kB
import { ModuleWithProviders } from '@angular/core'; import * as Showdown from 'showdown'; import { ShowdownConfig } from './showdown-config.provider'; /** * ### Example * * Add `ShowdownModule` to app `imports`. * ```typescript * import { NgModule } from '@angular/core'; * import { ShowdownModule } from 'ngx-showdown'; * * @NgModule({ * imports: [ ShowdownModule ]; * }) * export class AppModule {} * ``` */ export declare class ShowdownModule { /** * __Example :__ * * Add `ShowdownModule` to app `imports` with config. * ```typescript * import { NgModule } from '@angular/core'; * import { ShowdownModule } from 'ngx-showdown'; * * @NgModule({ * imports: [ ShowdownModule.forRoot({ * smartIndentationFix: true, * foo: 'bar', * flavor: 'github', * extensions: [ {type:'listener', listeners: {'codeBlocks.after': console.log}} ] * }) ]; * }) * export class AppModule {} * ``` * @param config - A root converter config for all converter instances. */ static forRoot(config: ShowdownConfig | Showdown.ConverterOptions): ModuleWithProviders<ShowdownModule>; }