block-content-to-react icon indicating copy to clipboard operation
block-content-to-react copied to clipboard

Issue with Ordered Lists

Open shanejones opened this issue 3 years ago • 1 comments

I'm using the default serializer with a few types for custom blocks

When using the list option in the editor, more specifically an ordered list, I can see that the content in the editor is numbered correctly.

When it comes to rendering this out on the frontend though, everything has the number 1 beside it.

The code shows that each list item is wrapped in an <ol> as you can see from this screenshot. Screenshot 2020-12-19 at 08 17 40

Is there anything I should be adding to add to the serializer to get these to group up into the same list?

shanejones avatar Dec 19 '20 08:12 shanejones

This issue is a duplicate of https://github.com/sanity-io/block-content-to-react/issues/23

This comment https://github.com/sanity-io/block-content-to-react/issues/23#issuecomment-668031729 should solve your problem.

nzhenry avatar Apr 13 '21 21:04 nzhenry

Closing this, as the new @portabletext/react library is the successor to this module. Please see https://github.com/portabletext/react-portabletext

rexxars avatar Jan 31 '23 01:01 rexxars