lexical icon indicating copy to clipboard operation
lexical copied to clipboard

Feature: Ordered lists starting with upper roman/ lower roman numbers

Open sanuradhag opened this issue 1 year ago • 1 comments

Description

Is there a way to insert numbered lists starting with upper roman/lower roman numbers? The current implementation only allows the user to insert a numbered list starting from 1. Ideally, it would be perfect if we could switch between these list types.

This will help to create an ordered list with either upper roman/lower roman as the list style.

sanuradhag avatar Jul 16 '24 07:07 sanuradhag

The only built-in customization for ordered lists is to specify a different CSS class for each depth using the olDepth theme parameter. The playground uses a different list-style-type for 5 depths. You can subclass ListNode and use node replacement to add additional state and apply CSS classes or html attributes as appropriate for your use case.

etrepum avatar Jul 16 '24 15:07 etrepum

I found this document useful for explaining how to customize lists using CSS: [https://css-tricks.com/list-style-recipes/]. I used this to achieve customization on Lexical list markers like you have described above. This shouldn't require any additional features from Lexical.

sophia-bouck avatar Jul 31 '24 22:07 sophia-bouck