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

Unable to determine list style type on rich text content #2211

Open
basic-steve opened this issue Apr 27, 2024 · 0 comments
Open

Unable to determine list style type on rich text content #2211

basic-steve opened this issue Apr 27, 2024 · 0 comments

Comments

@basic-steve
Copy link

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

  1. Create a rich text field
  2. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant