kramdown-to-html-pipe
v1.2.4
Published
Angular 2 Pipe that transforms a kramdown string to HTML. Forked from @conclurer/markdown-to-html-pipe
Downloads
6
Maintainers
Readme
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