Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

markdown-to-html-pipe

Package Overview
Dependencies
Maintainers
6
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-to-html-pipe

Angular Pipe that transforms a markdown string to HTML

latest
Source
npmnpm
Version
1.2.5
Version published
Weekly downloads
142
-21.98%
Maintainers
6
Weekly downloads
 
Created
Source

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

Keywords

angular2

FAQs

Package last updated on 13 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts