public final ReadOnlyIntegerProperty caretPositionProperty ()

taken from field

The current position of the caret within the text. The anchor and caretPosition make up the selection range. Selection must always be specified in terms of begin <= end, but anchor may be less than, equal to, or greater than the caretPosition. Depending on how the user selects text, the caretPosition might represent the lower or upper bound of the selection.