# .NET MAUI Editor Text Selection

The Editor supports a number of settings for managing the selection of its input text.

The text selection properties that are applicable for the Editor control are:

* `CursorPosition` (`int`)—Specifies the starting position of the cursor. The value must be greater than or equal to `0` and less than or equal to the length of the text.

* `SelectionLength` (`int`)—Specifies the length of the text selection. It starts at the `CursorPosition`.

* `SelectionOnFocus` (`enum` of type `Telerik.Maui.SelectionOnFocus`)—Specifies the modification over the text selection when the control receives focus. The available options are:
  * (Default) `Unchanged`—the selection will not be modified.
  * `CursorAtStart`—the cursor will be moved at the start of the text.
  * `CursorAtEnd`—the cursor will be moved at the end of the text.
  * `SelectAll`—the whole text will be selected.

The following snippet shows how to use the `SelectionOnFocus` property to preselect the Editor text as soon as the control receives focus:

```XAML
<telerik:RadEditor x:Name="editor"
                   Text="some text here"
                   SelectionOnFocus="SelectAll" />
```

## See Also

* [Text Appearance](https://www.telerik.com/maui-ui/documentation/controls/editor/text-appearance)
* [Events](https://www.telerik.com/maui-ui/documentation/controls/editor/events)
* [Styling](https://www.telerik.com/maui-ui/documentation/controls/editor/styling)
* [Validation](https://www.telerik.com/maui-ui/documentation/controls/editor/validation)
* [Visual States](https://www.telerik.com/maui-ui/documentation/controls/editor/visual-states)
