[ type ] CaretEvent

Description:

Caret event received by the onCaretEvents() handler callback.

Type: Object

Properties:

Name Type Description

target

object

The component that triggered the event.

type

string

Always change.

position

number

The new caret position.

selectionStart

number

Start position of selected text.

selectionEnd

number

End position of selected text.

[line]

number

Line number where the caret is located. Present in components like DocumentEditor.

[column]

number

Column number (offset from line start) of the caret. Present in multi-line components like DocumentEditor.

[styles]

object

Text formatting information at the caret’s position. Present only for DocumentEditor when HTML is enabled.

[path]

Array.<string>

HTML tag hierarchy at the caret’s position. Present only for DocumentEditor when HTML is enabled.

Also See: