microsoft / microsoft/roosterjs
Feature request: Support nested list indentation limit
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 190
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
We only support 3 levels of nesting in our lists at Yammer. We have implemented custom content correction to flatten any list items that indent too deeply. I'd like to request Rooster handle this natively so all we need to do is supply a config option. We have no requirements that vary between UL vs OL type of lists so unsure if you want to separate those out in your config expression. We also don't support mixing list types so that simplifies things for us somewhat. Whatever the solution it should ensure the content in the editor is never nested beyond some pre-defined limit whether that's via pasting, tabbing, using indent button etc. Our patch solution uses query selectors on content change to detect levels of nesting and re-arrange the DOM to move LI's up a level until they're not past the max depth - there is likely a better way to do this internally within Rooster. It may also be easier to preserve document selection / cursor anchor + focus positions.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Rooster handles list nesting during pasting, tabbing, and the indent button. Define what a configurable maximum depth should mean for ordered and unordered lists, then verify that each editing path keeps content within the limit without losing selection or cursor positions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100