Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Angular 2 Pipe that transforms a markdown string to HTML

License

Notifications You must be signed in to change notification settings

thing-it/markdown-to-html-pipe

 
 

Repository files navigation

Deprecation notice

Warning This package is no longer actively maintained. We have implemented a custom solution within our main repos. This serves as an archive and may be deleted in the future.

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

About

Angular 2 Pipe that transforms a markdown string to HTML

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%