Source @ https://github.com/dimpu/ngx-md
ngx-md contains MarkdownModule for Angular.
npm install ngx-md --save
yarn add ngx-md
angular-cli— please refer to Getting started with
angular-seed— please refer to Getting started with
system.js(and Angular 2 QuickStart) — please checkout sample repository
webpack— you can view our demo page source code
plnkr— sample available here
rollup— please refer to How to use
ngx-mdin Angular 2 with
Main source of API documentation and usage scenarios is available at https://dimpu.github.io/ngx-md/.
Is very welcome! And remember, contribution is not only PRs and code, but any help with docs or helping other developers to solve issues are very appreciated! Thanks in advance!
If you want syntax highlighting you need to import the prism css file.
Alternative 1: Import from cdn
Alternative 2: Download the css file (or copy it from
node_modules/prismjs/themes/, place it somewhere in your src folder and import
Alternative 3: Include the prism css file in your sass style file
### your markdown code<!-- or use angular component -->### your markdown code<!-- to load from remote URL --><!-- load remote source code with auto syntax highlighting --><!-- load remote source code from url stored in variable(see additional details about variable binding in the next section) -->
Now, with >1.4.x you can bind a variable to the
markdown component. To do so:
Marked can be customized/extended by accessing the renderer from the MarkdownService:
See marked documentation for all renderer extension points.
You can find a working example inside the
To serve it locally, run:
git clone https://github.com/dimpu/ngx-md.gitnpm inpm run demo.serve
The following is a list of all the people that have helped build this project. Thanks for your contributions!