Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imp (types): Improved types for List data and it's meta #109

Merged
merged 8 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,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 type |
e11sy marked this conversation as resolved.
Show resolved Hide resolved
| items | `Item[]` | the array of list's items |

Object `Item`:

Expand All @@ -97,7 +96,6 @@ Object `ItemMeta` for Ordered and Unordered lists would be empty.
"type" : "list",
"data" : {
"style": "unordered",
"maxLevel": 1,
"items": [
{
"content": "Apples",
Expand All @@ -121,9 +119,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",
Expand All @@ -147,7 +146,6 @@ Object `ItemMeta` for Ordered and Unordered lists would be empty.
"type" : "list",
"data" : {
"style": "checklist",
"maxLevel": 4,
"items" : [
{
"content": "Apples",
Expand Down
Loading
Loading