get or set the selection range, or cursor position, for contenteditable