🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

markdown-it-synapse-table

Package Overview
Dependencies
Maintainers
5
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-synapse-table

markdown-it-plugin for table formatting in Synapse.org

latest
Source
npmnpm
Version
1.0.8
Version published
Maintainers
5
Created
Source

markdown-it-synapse-table

Build Status NPM version Coverage Status

Synapse markdown table plugin for markdown-it markdown parser that supports Synapse md table syntax. Table headers are optional, and it supports a syntax to specify table css class names.

v1.+ requires markdown-it v5.+, see changelog.

Header 1 | Header 2 | Header 3
--- | --- | ---
Row 1 Content Cell 1  |  Row 1 Content Cell 2  |  Row 1 Content Cell 3
Row 2 Content Cell 1  |  Row 2 Content Cell 2  |  Row 2 Content Cell 3

=>

<table>
	<thead>
		<tr>
			<th>Header 1</th>
			<th>Header 2</th>
			<th>Header 3</th>
		</tr>
	</thead>
<tbody>
	<tr>
		<td>Row 1 Content Cell 1</td>
		<td>Row 1 Content Cell 2</td>
		<td>Row 1 Content Cell 3</td>
	</tr>
	<tr>
		<td>Row 2 Content Cell 1</td>
		<td>Row 2 Content Cell 2</td>
		<td>Row 2 Content Cell 3</td>
	</tr>
</tbody>
</table>
{| class="border text-align-center"
Row 1 Content Cell 1 | Row 1 Content Cell 2  | Row 1 Content Cell 3
Row 2 Content Cell 1 | Row 2 Content Cell 2  | Row 2 Content Cell 3
|}

=>

<table class=" border text-align-center">
	<tbody>
		<tr>
			<td>Row 1 Content Cell 1</td>
			<td>Row 1 Content Cell 2</td>
			<td>Row 1 Content Cell 3</td>
			</tr>
		<tr>
			<td>Row 2 Content Cell 1</td>
			<td>Row 2 Content Cell 2</td>
			<td>Row 2 Content Cell 3</td>
		</tr>
	</tbody>
</table>

Install

node.js, browser:

npm install markdown-it-synapse-table --save
bower install markdown-it-synapse-table --save

Use

var md = require('markdown-it')().use(require('markdown-it-synapse-table'))

md.render('table markdown')

Differences in browser. If you load script directly into the page, without package system, module will add itself globally as window.markdownitSynapseTable.

License

MIT

Keywords

markdown-it-plugin

FAQs

Package last updated on 11 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts