html-react-parser icon indicating copy to clipboard operation
html-react-parser copied to clipboard

Nested list not rendering

Open Lazy-Lad opened this issue 1 year ago • 4 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 avatar Jun 05 '24 12:06 Lazy-Lad

@Lazy-Lad Can you provide a reproducible example?

remarkablemark avatar Jun 05 '24 15:06 remarkablemark

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

nirobsmh avatar Jul 08 '24 05:07 nirobsmh

@mhNirob can you provide a reproducible example using StackBlitz?

remarkablemark avatar Jul 08 '24 05:07 remarkablemark

@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.

nirobsmh avatar Jul 08 '24 06:07 nirobsmh

Closing issue due to inactivity

remarkablemark avatar Dec 17 '24 00:12 remarkablemark