caretPosition([position])
Class: DocumentEditor. Method inherited from TextComponent.
Description:
Set or gets a position of caret in text editing components. Used in some text editing components only.
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
number |
The zero-based caret position to set. If omitted, returns current caret position. |
Returns:
If argument is provided, returns an instance of this component, otherwise a current caret position.
Type: this | number
