markdown-it-kramdown-attrs
0.1.0 • Public • Published Markdown-it Kramdown Attributes
Add a little bit of Kramdown love to your Markdown-it.
Usage
import KramdownAttrs from "markdown-it-kramdown-attrs"
import MarkdownIt from "markdown-it"
renderer = new MarkdownIt()
renderer.use(
KramdownAttrs
)
Examples
Inline Attributes with Parent attributes
# ![Text](image.jpg){:.class1}
{:.class2}
<h1 class="class2">
<img src="image.jpg" alt="Text" class="class1">
</h1>
Elements with Attributes
<p class="class1">
Text
</p>
Mixed {:}
and {:}
after new lines.
Text {.class1}
{.class2}
{.class3}
<p class="class1 class2 class3">
Text
</p>
# ![Text](image.jpg){:.class1}
{:.class2}
{:.class3}
{:.class4}
<h1 class="class2 class3 class4">
<img src="img.jpg" alt="Text" class="class1">
</h1>
Multiple in {:}
# ![Text](image.jpg){:.class1 .class2}
{:.class3 .class4}
<h1 class="class3 class4">
<img src="img.jpg" alt="Text" class="class1 class2">
</h1>
Readme
Keywords
nonePackage Sidebar
Install
npm i markdown-it-kramdown-attrs
Weekly Downloads
License
LicenseRef-license.txt