0.1.6 • Published 2 years ago

markdown-it-table-x v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

markdown-it-table-x

NPM version

:star: Caution: The plugin is usable but not perfect. There may be conflicts with other markdown plugin. I don't have enough testing in my project

Install

yarn add markdown-it-table-x

Example

markup must start on the first character of the line

{| class="html_attrs_in_table_tag success" style="height:12rem;" align="right"
! class="html_attrs_in_th_tag" align="center" || Name
! Description
|-
!class="html_attrs_in_th_tag" || *row-1-col-1*
|*here is td tag*
|-
!here is th tag
|class="html_attrs_in_td_tag" align="right"
* Embedding markdown content.
* Embedding markdown content.
 ![space_on_first_character]()
|}

rendered as

<table class="html_attrs_in_table_tag success" style="height:12rem;" align="right">
    <tbody>
        <tr>
            <th class="html_attrs_in_th_tag" align="center">Name</th>
            <th>Description</th>
        </tr>
        <tr>
            <th class="html_attrs_in_th_tag"><em>row-1-col-1</em></th>
            <td><em>here is td tag</em></td>
        </tr>
        <tr>
            <th>here is th tag</th>
            <td class="html_attrs_in_td_tag" align="right">
                <ul>
                    <li>Embedding markdown content.</li>
                    <li>Embedding markdown content.</li>
                </ul>
                <p><img src="" alt="space_on_first_character"></p>
            </td>
        </tr>
    </tbody>
</table>

Params

  • attrSeparate - custom attribute separate (default: || )
  • allowedAttrs - custom alloowed attributes (default:['id', 'class', 'style', 'width', 'height', 'align', 'rowspan', 'colspan'], set [] for allow all)
0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago