9 | | * We can add a second part of requiredContent rule for indent plugin, checking whether lists are allowed. This is quick fix, but user will be able to indent block when only nesting lists is allowed. |
10 | | * Therefore second, but more complex part of this solution would be to make indent and outdent buttons contextual and aware of ACF setting. Command would be refreshed based on current context (if caret is in block or list item) and what's allowed (indenting block and/or list items). This part is pretty tough because there has to be 1:1 relation - if command is enabled and indenting blocks is not allowed, the it should always nest this list item, not indent some block. And vice versa. |
| 9 | * We can add a second part of requiredContent rule for indent plugin, checking whether lists are allowed. This is a quick fix, but user will be able to indent block when only nesting lists is allowed. |
| 10 | * Therefore second, but more complex part of this solution would be to make indent and outdent buttons contextual and aware of ACF setting. Command would be refreshed based on current context (if caret is in block or list item) and what is allowed (indenting block and/or list items). This part is pretty tough because there has to be 1:1 relation - if command is enabled and indenting blocks is not allowed, then it should always nest this list item, not indent some block. And vice versa. |