https://github.com/hmarcelino/text2checklist
Generates a list of checkboxes from the content of a textarea
https://github.com/hmarcelino/text2checklist
checkboxes javascript jquery textarea
Last synced: 3 months ago
JSON representation
Generates a list of checkboxes from the content of a textarea
- Host: GitHub
- URL: https://github.com/hmarcelino/text2checklist
- Owner: hmarcelino
- Created: 2015-01-27T14:01:23.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-29T10:37:09.000Z (almost 11 years ago)
- Last Synced: 2023-03-12T03:33:43.126Z (about 3 years ago)
- Topics: checkboxes, javascript, jquery, textarea
- Language: JavaScript
- Homepage: http://hmarcelino.github.io/text2checklist/
- Size: 191 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Text 2 Checklist
A plugin that will build a checklist from the text of a textarea.
If the line starts with a '-' it will add a unchecked checkbox. otherwise of the line starts with a '+' it will add a checked checkbox.
See [demo](http://hmarcelino.github.io/text2checklist)!
## API
```html
**Bold header**
Placeholder text. Fusce congue magna id eros malesuada
- **Strong bullet point 1**
- **Strong bullet point 1**
```
#### Usage:
`$(".js-text-to-checklist").text2Checklist(opts);`
#### Options:
* `canEdit`: If the user can change the text of the textarea.
* `canCheck`: If the checklist is enabled
* `onChange`: Function that will be called when the text changes
#### Methods:
* `text2Checklist('init')`: Initialize the plugin. This is done when creating a new instance of text2Checklist
* `text2Checklist('value')`: Returns the current text value
* `text2Checklist('destroy')`: Destroy this instance of text2Checklist.
### Requirements:
* Jquery > 1.10