lexical icon indicating copy to clipboard operation
lexical copied to clipboard

Bug: `ListMaxIndentLevelPlugin` allows indent beyond `maxDepth` on paste

Open nooblyf opened this issue 2 years ago • 1 comments

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

  1. Go to https://playground.lexical.dev/ it has indent maxDepth of 7
  2. 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.

nooblyf avatar Oct 26 '23 16:10 nooblyf

Hi @etrepum. I solved the issue. Please have a look #6718

mdmuhtasimfuadfahim avatar Oct 09 '24 10:10 mdmuhtasimfuadfahim