npm.io
1.2.4 • Published 9 years ago

kramdown-to-html-pipe

Licence
MIT
Version
1.2.4
Deps
3
Vulns
3
Weekly
0

Kramdown To HTML Pipe

Converts a Kramdown string, outputs HTML.

Usage

import {Component} from '@angular/core';
import {KramdownToHtmlPipe} from 'kramdown-to-html-pipe';

@Component({
  selector: 'example',
  template: `<div [innerHTML]="content|KramdownToHtml"></div>`,
  pipes: [KramdownToHtmlPipe]
})
export class ExampleComponent {
  protected content: string = 'This will render **Kramdown** content!';
}

Will be rendered as:

<div>
  <p>This will render <strong>Kramdown</strong> content!</p>
</div>

Installation

Run

npm install --save kramdown-to-html-pipe

Keywords