markdown-it-embed-mathjax
A markdown-it collection lib with support for CSS classes (classy), HTML5-embed, and mathjax.
Last updated 3 years ago by diversen .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install markdown-it-embed-mathjax 
SYNC missed versions from official npm registry.

markdown-it-embed-mathjax

Markdown-it with mathjax, and html5 video embed

Video embed

Mathjax

Decorate

Install:

// Install and save
npm install markdown-it-embed-mathjax --save

Usage as lib:

// include the lib.
md = require('markdown-it-embed-mathjax');

// Change markdown-it default options as you like, e.g.: 
md.options.html = true;

// Render a string
var str = "<p>test</p># her er en test ![test](./test/test.mp4) $1 *2* 3$";
str+="\n\nPara with a CSS class{my-class}";
console.log(md.render(str));

Usage as CLI command

npm install -g markdown-it-embed-mathjax

Translate a string to a markdown-it rendered string (with option for CSS classes, mp4 embedding and mathjax): Reads from stdin or file(s), and outputs to stdout.

Example with stdin from a shell:

echo "A test with a auto link: http://github.com/diversen"  | markdown-it-embed-mathjax --linkify

Example with file(s):

markdown-it-embed-mathjax README.md --linkify --html --breaks

Options are the same as markdown-it options:

opts.boolean = ['help', 'html', 'xhtmlOut', 'breaks', 'linkify', 'typographer','decorate', 'embed', 'mathjax'];
opts.string = ['langPrefix', 'quotes'];

Video (like images):

![video test](http://techslides.com/demos/sample-videos/small.mp4)

Mathjax:

$1 *2* 3$

@ MIT

Current Tags

  • 1.0.19                                ...           latest (3 years ago)

17 Versions

  • 1.0.19                                ...           3 years ago
  • 1.0.18                                ...           3 years ago
  • 1.0.17                                ...           3 years ago
  • 1.0.16                                ...           3 years ago
  • 1.0.15                                ...           4 years ago
  • 1.0.14                                ...           4 years ago
  • 1.0.12                                ...           4 years ago
  • 1.0.11                                ...           4 years ago
  • 1.0.10                                ...           4 years ago
  • 1.0.9                                ...           4 years ago
  • 1.0.8                                ...           4 years ago
  • 1.0.7                                ...           4 years ago
  • 1.0.6                                ...           4 years ago
  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 17
Dependencies (7)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |