remarkablemark/html-react-parser

Nested list not rendering

Closed this issue · 5 comments

Expected Behavior

If we we have a list with a sublist in it it should render as it is,

  1. List item 1
    a. sub item 1

Actual Behavior

  1. List item
  2. Sub item

Steps to Reproduce

Use any RTE to get the HTML code and render it using ReactHTMLParser

@Lazy-Lad Can you provide a reproducible example?

I am getting the same issue in my project.
For example, for this HTML input - <strong>Key Products</strong></p><ul><li><strong>WPManageNinja</strong></li><li><strong>FluentForms</strong></li><li><strong>Ninja Tables</strong></li></ul><p><br></p><p>

Expected output:
Screenshot 2024-07-08 at 11 09 26 AM

But the output I am getting:
Screenshot 2024-07-08 at 11 10 38 AM

@mhNirob can you provide a reproducible example using StackBlitz?

@remarkablemark couldn't reproduce this issue from StackBlitz. Strange! It's working fine there but not in my project.
I am still trying to figure it out, I will let you know here if I find something.

Closing issue due to inactivity