diff --git a/README.md b/README.md index e99b17a..df5a9fd 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,6 @@ # Editorjs List Tool -Multi-leveled lists for the [Editor.js](https://editorjs.io). - -Use `Tab` and `Shift+Tab` keys to create or remove sublist with a padding. - -![](assets/example.gif) - -## Features - - 🤩 Part of [Editor.js](https://editorjs.io/) ecosystem. - 📂 Nesting. - 🔥 Ordered and Unordered lists. @@ -19,6 +11,11 @@ Use `Tab` and `Shift+Tab` keys to create or remove sublist with a padding. - 🪜 Max nesting level configuration. - 📝 Compatible with [List](https://github.com/editor-js/list) and [Checklist](https://github.com/editor-js/checklist). + +![](assets/example.gif) + +Use `Tab` and `Shift+Tab` keys to create or remove sublist with a padding. + ## Installation Get the package @@ -67,12 +64,11 @@ var editor = EditorJS({ ## Output data -| Field | Type | Description | List type | -| ----------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | -| style | `string` | list will be rendered with this style: `ordered`, `unordered` or `checklist`, default is `defaultStyle` from tool config | `ordered`, `unordered`, `checklist` | -| start | `number` | list will start with this number, default is `1` | `ordered` | -| counterType | `number` | type of the counters: `numeric`, `lower-roman`, `upper-roman`, `lower-alpha`, `upper-alpha`, default is `numeric` | `ordered` | -| items | `Item[]` | the array of list's items | `ordered`, `unordered`, `checklist` | +| Field | Type | Description | +| ----------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | +| style | `string` | list will be rendered with this style: `ordered`, `unordered` or `checklist`, default is `defaultStyle` from tool config | +| meta | `ItemMeta`| Item meta based on the list style | +| items | `Item[]` | the array of list's items | Object `Item`: @@ -88,7 +84,15 @@ Object `ItemMeta` for Checklist: | ------- | --------- | ------------------------- | | checked | `boolean` | state of the checkbox | -Object `ItemMeta` for Ordered and Unordered lists would be empty. +Object `ItemMeta` for Ordered list + +| Field | Type | Description | +| ------- | --------- | ------------------------- | +| start | `number` | number for list to start with, default is 1 | +| counterType | `string` | counter type for list, it could be `numeric`, `lower-roman`, `upper-roman`, `lower-alpha`, `upper-alpha`, default is `numeric` | + + +Object `ItemMeta` for Unordered list would be empty. ## Example of the content for `Unordered List` @@ -97,7 +101,6 @@ Object `ItemMeta` for Ordered and Unordered lists would be empty. "type" : "list", "data" : { "style": "unordered", - "maxLevel": 1, "items": [ { "content": "Apples", @@ -121,9 +124,10 @@ Object `ItemMeta` for Ordered and Unordered lists would be empty. "type" : "list", "data" : { "style": "ordered", - "start": 2, - "counterType": "upper-roman", - "maxLevel": 4, + "meta": { + "start": 2, + "counterType": "upper-roman", + }, "items" : [ { "content": "Apples", @@ -147,7 +151,6 @@ Object `ItemMeta` for Ordered and Unordered lists would be empty. "type" : "list", "data" : { "style": "checklist", - "maxLevel": 4, "items" : [ { "content": "Apples", diff --git a/example/example.html b/example/example.html deleted file mode 100644 index 6f6f363..0000000 --- a/example/example.html +++ /dev/null @@ -1,402 +0,0 @@ - - -
- -