Skip to content

Fix indent for orderedlist paragraph#636

Open
DavidPerezP124 wants to merge 1 commit intoMohamedRejeb:mainfrom
DavidPerezP124:fix/davidp/orderedlist-indent
Open

Fix indent for orderedlist paragraph#636
DavidPerezP124 wants to merge 1 commit intoMohamedRejeb:mainfrom
DavidPerezP124:fix/davidp/orderedlist-indent

Conversation

@DavidPerezP124
Copy link

Issue:

Indent for ordered list is not working as expected.

Using a listIndent or orderedListIndent less than the prefix's width results in the number always being cutoff from the editor.

Using Sample's default MarkdownEditorContent implementation with richTextState.config.orderedListIndent = 40
Screenshot 2026-01-23 at 3 10 46 p m

Solution:

This adds the startTextWidth to the level multiplier for the restLine, instead of removing it from the firstline which always removed the width of the number in the list.

Before and After Screenshot

Using richTextState.config.orderedListIndent = 0
Before:
Screenshot 2026-01-23 at 2 47 08 p m

After:
Screenshot 2026-01-23 at 2 49 26 p m

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

Successfully merging this pull request may close these issues.

1 participant