markdown-it-extensible-container
Plugin to create block-level extensible fences for markdown-it markdown parser
With this plugin you can toogle pre
blocks' visible state, if it is too long. Used in browser.
This plugin renders following text
```
To be or not to be
This is a question
```
as:
<div class='extensible-fence'><i class='extensible-fence-btn'></i><pre><code>To be or not to be
This is a question
</code></pre>
</div>
Classnames are configurable.
Installation
npm
$ npm install --save-dev markdown-it-extensible-fence
browser
API
var md =
Params:
- options:
- className: className for the container div of the
pre
element. Default is 'extensible-fence'
- className: className for the container div of the
Example
// nodejsvar md = md // browservar md = windowmd...// after render and append it to domvar containers = documentcontainers