contentful.js
contentful.js copied to clipboard
Unable to determine list style type on rich text content
Expected Behavior
Receiving list style type from rich text content, to apply later custom styling
Actual Behavior
{
"nodeType": "paragraph",
"data": {},
"content": [
{
"nodeType": "text",
"value": "List example",
"marks": [],
"data": {}
}
]
},
{
"nodeType": "ordered-list",
"data": {},
"content": [
{
"nodeType": "list-item",
"data": {},
"content": [
{
"nodeType": "paragraph",
"data": {},
"content": [
{
"nodeType": "text",
"value": "test",
"marks": [],
"data": {}
}
]
},
{
"nodeType": "ordered-list",
"data": {},
"content": [
{
"nodeType": "list-item",
"data": {},
"content": [
{
"nodeType": "paragraph",
"data": {},
"content": [
{
"nodeType": "text",
"value": "hello",
"marks": [],
"data": {}
}
]
},
{
"nodeType": "ordered-list",
"data": {},
"content": [
{
"nodeType": "list-item",
"data": {},
"content": [
{
"nodeType": "paragraph",
"data": {},
"content": [
{
"nodeType": "text",
"value": "world",
"marks": [],
"data": {}
}
]
},
{
"nodeType": "ordered-list",
"data": {},
"content": [
{
"nodeType": "list-item",
"data": {},
"content": [
{
"nodeType": "paragraph",
"data": {},
"content": [
{
"nodeType": "text",
"value": "",
"marks": [],
"data": {}
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
Steps to Reproduce
- Create a rich text field
- create a list with nested elements, see video below https://github.com/contentful/contentful.js/assets/13244343/17ca4d41-431d-4f19-81c7-d4b9cb75b9d1
Context
Cannot know how detect list style type to print HTML list correctly
Environment
- Language Version: v20.6.1
- Package Manager Version: 8.7.6
- Operating System: Darwin Stefanos-MacBook-Pro.local 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm64
- Package Version: 10.6.16