22. deleteSelectionOrDeleteChar
Prev | Chapter 6. Commands written in the Java™ programming language | Next

## 22. deleteSelectionOrDeleteChar

Parameter syntax:

    [ 'backwards' ]?

- If there is a text or node selection, this selection is deleted.

- If the caret is inside an empty text node, this empty text node is deleted. If the empty text node is the sole child of its parent element, it is the parent element as a whole which is deleted.

- Otherwise, delete the character found after the caret. If option `backwards` is specified, delete the character found before the caret.

This command is intended to be bound to keys Del and BackSpace. See also `deleteSelectionOrJoinBlockOrDeleteChar`.

Prev | Up | Next
21. deleteChar | Home | 23. deleteSelectionOrJoinBlockOrDeleteChar