Skip to content

zbicin/markdown-to-html-pipe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown To HTML Pipe

Converts a Markdown string, outputs HTML.

Usage

import {Component} from '@angular/core';
import {MarkdownToHtmlPipe} from 'markdown-to-html-pipe';

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

Will be rendered as:

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

Installation

Run

npm install --save markdown-to-html-pipe

About

Angular 2 Pipe that transforms a markdown string to HTML

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%