Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/calumk/editorjs-nested-checklist
Nested list Tool, with checkboxes for EditorJS
https://github.com/calumk/editorjs-nested-checklist
Last synced: 15 days ago
JSON representation
Nested list Tool, with checkboxes for EditorJS
- Host: GitHub
- URL: https://github.com/calumk/editorjs-nested-checklist
- Owner: calumk
- Created: 2022-04-19T18:23:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-24T09:57:16.000Z (over 1 year ago)
- Last Synced: 2024-10-19T11:52:16.968Z (20 days ago)
- Language: JavaScript
- Size: 710 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-editorjs - @calumk/editorjs-nested-checklist
README
# EditorJs - Nested CheckList
### NPM
npm i @calumk/editorjs-nested-checklist### JS
https://cdn.jsdelivr.net/npm/@calumk/editorjs-nested-checklist@latest
---
# About
Multi-leveled lists for the [Editor.js](https://editorjs.io).
This aims to supersede/replace all other EditorJs List blocks :fire: :fire: :fire:
## Demo
![](example-media/Demo.gif)
## Built with:
Built on-top of the official nested-list plugin, but with enough changes to warrent its own release
## Use
Use `Tab` and `Shift+Tab` keys to create or remove sublist with a padding.---
## Use
Add the NestedList Tool to the `tools` property of the Editor.js initial config.
```javascript
import EditorJS from '@editorjs/editorjs';
import editorjsNestedChecklist from '@calumk/editorjs-nested-checklist';var editor = EditorJS({
// ...
tools: {
...
nestedchecklist : editorjsNestedChecklist
},
});
```## Config Params
This Tool has no config params## Tool's settings
You can choose list`s type.
| Style | Description |
| --------- | -------------------------- |
| none | No style, indentation only |
| Ordered | Numbered |
| Unordered | Bullets |## Output data
| Field | Type | Description |
| ----- | -------- | -------------------------------------------------- |
| style | `string` | type of a list: `ordered` or `unordered` or `none` |
| items | `Item[]` | the array of list's items |Object `Item`:
| Field | Type | Description |
| ------- | -------- | ------------------------- |
| content | `string` | item's string content |
| items | `Item[]` | the array of list's items |```json
{
"type" : "list",
"data" : {
"style" : "unordered",
"items" : [
{
"content": "Apples",
"checked": null,
"items": [
{
"content": "Red",
"checked" : true,
"items": []
},
{
"content": "Green",
"checked" : false,
"items": []
},
]
},
{
"content": "Bananas",
"items": [
{
"content": "Yellow",
"checked" : true,
"items": []
},
]
},
]
}
},
```