markdown-it-codetabs
v1.2.0
Published
Show your code blocks in different tabs.
Downloads
1,514
Maintainers
Readme
markdown-it-codetabs
Code tabs plugin for markdown-it markdown parser.
Install
npm install markdown-it-codetabs --save
Use
Render your file:
var md = require('markdown-it')() .use(require('markdown-it-codetabs')); // `group` and `tab` can only contain characters in [A-Za-z0-9_]. md.render('```js [group:tab]\nconsole.log("hello");\n```');
Import your own styles, you can start from codetabs.scss.
MD Example
```js [g1:JavaScript]
console.log("hello");
```
```py [g1:Python3]
print("hello")
```
Notice: DON'T add anything except white space between two code blocks.