Markdown-it plugin to create tips. You can use any type of tip you want, proposed is to use the same type for everything; warning
,error
,success
,info
,danger
or keep the type blank for the default styling of a message.
::: warning
Hello world! [Link](#).
:::
Gets converted to:
<div class="notification is-warning" role="md-tip">
<p>Hello world! <a href="#" class="md-tip-link">Link</a>.</p>
</div>
$ npm install markdown-it-tips --save
var md = require('markdown-it');
var tips = require('markdown-it-tips');
md().use(tips);
Enable/disable adding class md-tip-link
to links inside tips.
var md = require('markdown-it');
var tips = require('markdown-it-tips');
md().use(tips, {links: false});
With option links
enabled (by default):
This is a test. [Link](#).
::: success
Hello world! [Link](#).
:::
This is a test. [Link](#).
Gets converted to:
<p>This is a test. <a href="#">Link</a>.</p>
<p class="md-tip md-tip-success" role="md-tip">
<p>Hello world! <a href="#" class="md-tip-link">Link</a>.</p>
</p>
<p>This is a test. <a href="#">Link</a>.</p>