https://github.com/apiaryio/markedit-aligned-table
Modified MarkedIt table renderer for sanitizer-friendly column alignment
https://github.com/apiaryio/markedit-aligned-table
Last synced: about 1 year ago
JSON representation
Modified MarkedIt table renderer for sanitizer-friendly column alignment
- Host: GitHub
- URL: https://github.com/apiaryio/markedit-aligned-table
- Owner: apiaryio
- License: mit
- Archived: true
- Created: 2015-11-26T19:21:14.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-09T12:58:44.000Z (over 10 years ago)
- Last Synced: 2025-05-30T00:07:30.509Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# markedit-aligned-table
[](https://circleci.com/gh/apiaryio/markedit-aligned-table)
This is modified version of [MarkedIt's table renderer](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_block/table.js). The only difference is that it uses `align="where"` instead of `style="text-align: where"` for column alignment, because the latter is stripped during sanitisation by Google CAJA's [sanitizer](https://www.npmjs.com/package/sanitizer).
## Installation
```shell
npm install markedit-aligned-table
```
## Usage
```js
var md = require('markdown-it')('commonmark')
.disable('table')
.use(require('markedit-aligned-table'));
```