Type Editor / @type-editor/commands / delete-selection
delete-selection
Variables
| Variable | Description |
|---|---|
Deletes the current selection if one exists. This command removes all content within the current selection range. If the selection is empty (just a cursor position), the command returns This is typically used as the first command in a chain for delete operations, allowing more specific deletion behaviors to take over when there's no selection. Param The current editor state Param Optional dispatch function to execute the transaction Example typescript |