$caretRangeFromSelection
functionGet a pair of carets for a RangeSelection. If the focus is before the anchor, then the direction will be 'previous', otherwise the direction will be 'next'.
Get a pair of carets for a RangeSelection. If the focus is before the anchor, then the direction will be 'previous', otherwise the direction will be 'next'.