You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
During list item indenting, draft ensures correct nesting by checking that an indented item will have a parent one level lower. But when an item is dedented, its descendants stay at the same level, giving children two or more levels deeper. The descendants should also be dedented I would think.
The text was updated successfully, but these errors were encountered:
FYI, Google Docs and OpenOffice seem to allow independent indent/dedent of items, regardless of next/previous items. So the current dedent behavior of Draft is consistent with that, but the indent behavior isn't.
Yeah, this is something I remember spotting a while back.
I think Quip also allows free indenting.
I'd be fine with the Draft core also allowing this, since I don't think the framework needs to be opinionated about it.
For Draft-based editors at FB, I think we didn't want to allow arbitrary indentation. RichUtils could be the right place to do some enforcement here, since it's not required that clients use it.
Summary:
**Summary**
Solves #270. Removes restriction on indenting beyond one level deeper than the block above. Also allows indenting the very first item in a list. And all I had to do was delete code!
![image](https://cloud.githubusercontent.com/assets/253298/19991316/8dfb376e-a1f1-11e6-8e93-b8b49c30010b.png)
**Test Plan**
1. Try indenting the first item in a list.
2. Try indenting a list item more than one level deeper than the item above it.
Closes#762
Differential Revision: D7137964
fbshipit-source-id: 597732b363537e34a0f466c3188f334b3fa30a9e
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
During list item indenting, draft ensures correct nesting by checking that an indented item will have a parent one level lower. But when an item is dedented, its descendants stay at the same level, giving children two or more levels deeper. The descendants should also be dedented I would think.
The text was updated successfully, but these errors were encountered: