{"id":27075094,"url":"https://github.com/editor-js/nested-list","last_synced_at":"2025-04-06T00:02:44.344Z","repository":{"id":41220238,"uuid":"340106262","full_name":"editor-js/list","owner":"editor-js","description":"Advanced List tool for the Editor.js.","archived":false,"fork":false,"pushed_at":"2025-02-28T09:41:12.000Z","size":4720,"stargazers_count":64,"open_issues_count":19,"forks_count":51,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T03:06:01.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/editor-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-18T16:16:24.000Z","updated_at":"2025-04-02T23:07:19.000Z","dependencies_parsed_at":"2023-11-09T13:29:33.687Z","dependency_job_id":"1929f0be-b2ff-4a69-aeec-217649d03629","html_url":"https://github.com/editor-js/list","commit_stats":{"total_commits":288,"total_committers":13,"mean_commits":"22.153846153846153","dds":0.5416666666666667,"last_synced_commit":"bbc46d557bb5711dd27517272ae2754e1da04697"},"previous_names":["editor-js/list","editor-js/nested-list"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editor-js%2Flist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editor-js%2Flist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editor-js%2Flist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editor-js%2Flist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/editor-js","download_url":"https://codeload.github.com/editor-js/list/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415950,"owners_count":20935388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-06T00:01:41.014Z","updated_at":"2025-04-06T00:02:44.334Z","avatar_url":"https://github.com/editor-js.png","language":"TypeScript","funding_links":[],"categories":["Tools"],"sub_categories":["Block Tools"],"readme":"![](https://badgen.net/badge/Editor.js/v2.19.2/blue)\n\n# Editorjs List Tool\n\n![](assets/readme_image.png)\n\n- 🤩 Part of [Editor.js](https://editorjs.io/) ecosystem.\n- 📂 Nesting.\n- 🔥 Ordered and Unordered lists.\n- ✅ Checklists.\n- 🔢 Customizable start number.\n- 🏛️ Customizable counter type (e.g. `lower-roman`).\n- 🪜 Max nesting level configuration.\n- 📝 Compatible with [List](https://github.com/editor-js/list) and [Checklist](https://github.com/editor-js/checklist).\n\n![](assets/demo.gif)\n\nUse `Tab` and `Shift+Tab` keys to create or remove sublist with a padding.\n\n## Installation\n\nGet the package\n\n```shell\nyarn add @editorjs/list\n```\n\nInclude module at your application\n\n```javascript\nimport EditorjsList from '@editorjs/list';\n```\n\nOptionally, you can load this tool from CDN [JsDelivr CDN](https://cdn.jsdelivr.net/npm/@editorjs/list@2)\n\n## Usage\n\nAdd the List Tool to the `tools` property of the Editor.js initial config.\n\n```javascript\nimport EditorJS from '@editorjs/editorjs';\nimport EditorjsList from '@editorjs/list';\n\nvar editor = EditorJS({\n  // ...\n  tools: {\n    ...\n    list: {\n      class: EditorjsList,\n      inlineToolbar: true,\n      config: {\n        defaultStyle: 'unordered'\n      },\n    },\n  },\n});\n```\n\u003e [!IMPORTANT]\n\u003e Note that in List 2.0 class name changed from `List` to `EditorjsList`.\n\n## Config Params\n\n| Field        | Type     | Description                                                    |\n|--------------|----------|----------------------------------------------------------------|\n| defaultStyle | `string` | default list style: `ordered`, `unordered` or `checklist`, default is `unordered` |\n| maxLevel     | `number` | maximum level of the list nesting, could be set to `1` to disable nesting, unlimited by default |\n| counterTypes | `string[]` | specifies which counter types should be shown in the ordered list style, could be set to `['numeric','upper-roman']`, default is `undefined` which shows all counter types |\n\n## Output data\n\n| Field             | Type      |  Description                                                                                                              |\n| ----------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- |\n| style             | `string`  |  list will be rendered with this style: `ordered`, `unordered` or `checklist`, default is `defaultStyle` from tool config |\n| meta              | `ItemMeta`|  Item meta based on the list style                                                                                         |\n| items             | `Item[]`  |  the array of list's items                                                                                                |\n\nObject `Item`:\n\n| Field   | Type       | Description                 |\n| ------- | ---------- | --------------------------- |\n| content | `string`   | item's string content       |\n| meta    | `ItemMeta` | meta information about item |\n| items   | `Item[]`   | the array of list's items   |\n\nObject `ItemMeta` for Checklist:\n\n| Field   | Type      | Description               |\n| ------- | --------- | ------------------------- |\n| checked | `boolean` | state of the checkbox     |\n\nObject `ItemMeta` for Ordered list\n\n| Field   | Type      | Description               |\n| ------- | --------- | ------------------------- |\n| start   | `number`  | number for list to start with, default is 1 |\n| counterType | `string`  | counter type for list, it could be `numeric`, `lower-roman`, `upper-roman`, `lower-alpha`, `upper-alpha`, default is `numeric` |\n\n\nObject `ItemMeta` for Unordered list would be empty.\n\n## Localisation\nIf you want to use your language for toolbox items, you can pass i18n dictionary to the editorjs instance below the tools `block`:\n```javascript\ni18n: { \n  messages: {\n    \"toolNames\": {\n      \"Ordered List\": \"Nummerierte Liste\",\n      \"Unordered List\": \"Unnummeriert Liste\",\n      \"Checklist\": \"Checkliste\",\n    },\n    \"tools\": {\n      \"List\": {\n        'Unordered': 'Unnummeriert',\n        'Ordered': 'Nummerierte',\n        'Checklist': 'Checkliste',\n      }\n    },\n  },\n},\n```\n\n### Other supported keys for `tools.List`\n- `Start with`\n- `Counter type`\n- `Numeric`\n- `Lower Roman`\n- `Upper Roman`\n- `Lower Alpha`\n- `Upper Alpha`\n\n## Example of the content for `Unordered List`\n```json\n{\n  \"type\" : \"list\",\n  \"data\" : {\n    \"style\": \"unordered\",\n    \"items\": [\n      {\n        \"content\": \"Apples\",\n        \"meta\": {},\n        \"items\": [\n          {\n            \"content\": \"Red\",\n            \"meta\": {},\n            \"items\": []\n          },\n        ]\n      },\n    ]\n  }\n},\n```\n\n## Example of the content for `Ordered List`\n```json\n{\n  \"type\" : \"list\",\n  \"data\" : {\n    \"style\": \"ordered\",\n    \"meta\": {\n      \"start\": 2,\n      \"counterType\": \"upper-roman\",\n    },\n    \"items\" : [\n      {\n        \"content\": \"Apples\",\n        \"meta\": {},\n        \"items\": [\n          {\n            \"content\": \"Red\",\n            \"meta\": {},\n            \"items\": []\n          },\n        ]\n      },\n    ]\n  }\n},\n```\n\n## Example of the content for `Checklist`\n```json\n{\n  \"type\" : \"list\",\n  \"data\" : {\n    \"style\": \"checklist\",\n    \"items\" : [\n      {\n        \"content\": \"Apples\",\n        \"meta\": {\n          \"checked\": false\n        },\n        \"items\": [\n          {\n            \"content\": \"Red\",\n            \"meta\": {\n              \"checked\": true\n            },\n            \"items\": []\n          },\n        ]\n      },\n    ]\n  }\n},\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feditor-js%2Fnested-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feditor-js%2Fnested-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feditor-js%2Fnested-list/lists"}