Type Editor / @type-editor/commands / lift-empty-block
lift-empty-block
Variables
| Variable | Description |
|---|---|
Lifts an empty textblock out of its parent structure. This command handles the special case of empty textblocks, providing intelligent behavior depending on the context: Split Strategy: If the empty block is nested and not at the end of its parent, the command splits the parent structure instead of lifting. This is particularly useful for:
Lift Strategy: Otherwise, the command lifts the empty block out of its parent, effectively removing one level of nesting. This command is commonly used to handle the Enter key in empty blocks, allowing users to naturally escape from nested structures. The command only works when:
Param The current editor state Param Optional dispatch function to execute the transaction Example typescript |