-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
Only available as a keyboard shortcut at the moment. Applies to blocks that have a notion of depth – list items only at the moment.
This could be built as an example / extension, using the controls API, instead of something that’s built-in. It would be nice to have this as a demo directly in the repo though.
Here is how it would work roughly:
- Add button(s) in the toolbar using the
controlsAPI. - On click, retrieve the editor state with the
getEditorStateprop of the control - Check where the selection is (
editorState.getSelection()) - If it's in a block that's a list item, apply the right effect (indent / dedent) by incrementing/decrementing the block’s
depth.
Initially reported at springload/wagtaildraftail#49 by @tomdyson.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed