markdown-it-kramdown-attrs
Kramdown Style Attributes for Markdown-it
Last updated 4 years ago by envygeeks .
LicenseRef-license.txt · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install markdown-it-kramdown-attrs 
SYNC missed versions from official npm registry.

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

Text {.class1}
<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>

Current Tags

  • 0.1.0                                ...           latest (4 years ago)

2 Versions

  • 0.1.0                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |