# markdown-it-task-checkbox

> A markdown-it plugin to create GitHub-style task lists

Latest version **1.0.6** (published 2018-01-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install markdown-it-task-checkbox
pnpm add markdown-it-task-checkbox
yarn add markdown-it-task-checkbox
bun add markdown-it-task-checkbox
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2018-01-05 |
| First published | 2016-09-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | linsir |
| Maintainers | linsir |
| Keywords | markdown, markdown-it, markdown-it-plugin, task, list, todo, checkbox |

## Links

- npm: https://www.npmjs.com/package/markdown-it-task-checkbox
- Repository: https://github.com/linsir/markdown-it-task-checkbox
- Homepage: https://github.com/linsir/markdown-it-task-checkbox#readme
- Issues: https://github.com/linsir/markdown-it-task-checkbox/issues
- npm.io page: https://npm.io/package/markdown-it-task-checkbox

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.0.6 (latest) — 2018-01-05
- 1.0.5 — 2017-12-05
- 1.0.4 — 2017-06-07
- 1.0.3 — 2017-02-18
- 1.0.2 — 2017-01-19
- 1.0.1 — 2016-11-17
- 1.0.0 — 2016-09-21

## README

# markdown-it-task-checkbox

A [markdown-it](https://www.npmjs.com/package/markdown-it) plugin to create GitHub-style [task lists](https://github.com/blog/1825-task-lists-in-all-markdown-documents)

Modified from <https://github.com/mcecot/markdown-it-checkbox> and <https://github.com/revin/markdown-it-task-lists>


## Usage

## Install

node.js:

```bash
npm install markdown-it-task-checkbox --save
```

## Use

```js
var md = require('markdown-it')()
            .use(require('markdown-it-checkbox'),{
              disabled: true,
              divWrap: false,
              divClass: 'checkbox',
              idPrefix: 'cbx_',
              ulClass: 'task-list',
              liClass: 'task-list-item'
            });

md.render('- [x] unchecked') // =>
// <ul class="task-list">
//  <li class="task-list-item">
//     <div classname="checkbox">
//       <input type="checkbox" id="cbx_0" checked="true" disabled="true">
//       <label for="cbx_0">unchecked</label>
//     </div>
//  </li>
// </ul>
```

_Differences in browser._ If you load script directly into the page, without
package system, module will add itself globally as `window.markdownitCheckbox`.

## Options


## disabled

* **Type:** `Boolean`
* **Default:** `true`

if the value is true, the checkbox can not be selected.

## divWrap

* **Type:** `Boolean`
* **Default:** `false`

wrap div arround checkbox. this makes it possible to use it for example with [Awesome Bootstrap Checkbox](https://github.com/flatlogic/awesome-bootstrap-checkbox/).

## divClass

* **Type:** `String`
* **Default:** `checkbox`

classname of div wrapper. will only be used if `divWrap` is enanbled.

## idPrefix

* **Type:** `String`
* **Default:** `cbx_`

the id of the checkboxs input contains the prefix and an incremental number starting with `0`. i.e. `cbx_1` for the 2nd checkbox.

## ulClass

* **Type:** `String`
* **Default:** `task-list`

classname of ul wrapper.

## liClass

* **Type:** `String`
* **Default:** `task-list-item`

classname of li wrapper.

## THANKS

<https://github.com/mcecot/markdown-it-checkbox> and <https://github.com/revin/markdown-it-task-lists>

## License

MIT License © 2016 Linsir

---
_Source: https://npm.io/package/markdown-it-task-checkbox · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
