EasyBind.map(caretPosition2D, p -> p.getMinor()));
selectionStart2D = position(0, 0);
selectionEnd2D = position(0, 0);
internalSelection.addListener(obs -> {
IndexRange sel = internalSelection.get();
selectionStart2D = offsetToPosition(sel.getStart(), Forward);
selectionEnd2D = sel.getLength() == 0
? selectionStart2D
: selectionStart2D.offsetBy(sel.getLength(), Backward);
});
selectedText = new org.reactfx.inhibeans.binding.StringBinding() {
{ bind(internalSelection, content.textProperty()); }
@Override protected String computeValue() {