markdown-to-html-pipe
TypeScript icon, indicating that this package has built-in type declarations

1.2.5 • Public • Published

Markdown To HTML Pipe

Converts a Markdown string, outputs HTML.

Usage

// example.module.ts
import {NgModule} from '@angular/core';
import {MarkdownToHtmlModule} from 'markdown-to-html-pipe';
import {ExampleComponent} from './example.component';
 
@NgModule({
  imports: [MarkdownToHtmlModule],
  declarations: [ExampleComponent]
})
export class ExampleModule {}
// example.component.ts
import {Component} from '@angular/core';
 
@Component({
  selector: 'example',
  template: `<div [innerHTML]="content|MarkdownToHtml"></div>`
})
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

Package Sidebar

Install

npm i markdown-to-html-pipe

Weekly Downloads

242

Version

1.2.5

License

MIT

Unpacked Size

7.63 kB

Total Files

10

Last publish

Collaborators

  • chrisconclurer
  • maxzeger
  • julian_bm
  • lemonlime
  • can557
  • mc17uulm
  • maehldom
  • marvinscharle