Skip to content

Bug: ListMaxIndentLevelPlugin allows indent beyond maxDepth on paste #5170

Open
@nooblyf

Description

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

lexical_list_indent_bug.mov

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions