markdown-it-codesandbox-embed

0.1.0 • Public • Published

markdown-it-codesandbox-embed

markdown-it plugin for creating sandboxes on the fly for your code examples.

Install it with: npm i markdown-it-codesandbox-embed

Use:

const mdCodesandbox = require('markdown-it-codesandbox-embed')
 
// ...
 
md.use(mdCodesandbox, { directory: 'my-examples' })
 

And in the markdown:

# My example
 
@[codesandbox](example-1)
 
Also works with params:
 
@[codesandbox](example-1?view=split)

Then you should save your sandbox files in the my-examples/example-1/ folder.

/markdown-it-codesandbox-embed/

    Package Sidebar

    Install

    npm i markdown-it-codesandbox-embed

    Weekly Downloads

    67

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    4.92 kB

    Total Files

    3

    Last publish

    Collaborators

    • carloslfu