lexical
lexical copied to clipboard
Bug: `ListMaxIndentLevelPlugin` allows indent beyond `maxDepth` on paste
The playground has a max depth of 7 for list indents but you can bypass it by pasting the indents as shown in the screen recording
https://github.com/facebook/lexical/assets/54323745/594036f3-5ffb-43ea-8a84-3bc72bd49ad7
Lexical version: 0.12.2
Steps To Reproduce
- Go to https://playground.lexical.dev/ it has indent maxDepth of 7
- Paste indented list having depth more than 7, you'll be able to paste it successfully
The current behavior
maxDepth for ListMaxIndentLevelPlugin only stops directly indenting lists in the editor
The expected behavior
Even when pasting indented content it should still adhere to maxDepth by the editor, it should remove those extra indents.
Hi @etrepum. I solved the issue. Please have a look #6718