Added caretRange to allow old version of caret to work.
caretRange support Start and End Position of caret.