4.0.0 • Published 8 years ago

@calle/ng2-markdown-viewer v4.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

ng2-markdown

Based on info in this link:

http://stackoverflow.com/questions/34784778/equivalent-of-compile-in-angular-2

Runtime compilation of markdown to Angular 2 HTML template

  • npm install --save-dev @calle/ng2-markdown-viewer commonmark highlight.js
  • If you're using webpack you also need to use json-loader since commonmark loads JSON files
  • typings install dt~commonmark dt~highlightjs --global --save
  • Add the MarkdownViewerModule to your app:
import { MarkdownViewerModule } from '@calle/ng2-markdown-viewer'
  • The component is currently rendered only on ngAfterViewInit so you need to have the markdownText available before instantiating.
  • Put the markdown-viewer component in your template:
<markdown-viewer
  *ngIf="markdownText"
  [markdown]="markdownText"
  [styles]="[markdownStyles]">
</markdown-viewer>
4.0.0

8 years ago

1.1.7

8 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago