Skip to content
/ marked Public

Another markdown wrapper component for Angular, build with simplicity and clarity in mind. 🎉

Notifications You must be signed in to change notification settings

angeeks/marked

Repository files navigation

ngk-markdown aka ngk-md

Build Status npm version

Another markdown wrapper component for Angular, build with simplicity and clarity in mind. Note that by default, it use marked.js as the parser (that's why this project called), see below to use your own parser.

Installation

npm i -P @angeeks/md

Usage

// app.module.ts
+import { MdModule } from '@angeeks/md';

@NgModule({
  imports: [
+   MdModule
  ]
})
export class AppModule {}
<!-- app.component.html -->
<ngk-md [src]='src'></ngk-md>
<!-- or if you type fast -->
<ngk-markdown [src]='src'></ngk-markdown>

Replace parser

// app.module.ts
+import { mdParser, Parser } from '@angeeks/md';

+export function yourMarkdownParser(): Parser {
+  return { parse };
+}

@NgModule({
  imports: [
    MdModule
  ],
  providers: [
+   { provide: mdParser, useFactory: yourMarkdownParser }
  ]
}
})
export class AppModule {}

About

Another markdown wrapper component for Angular, build with simplicity and clarity in mind. 🎉

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published