var start = (elem.textContent||elem.innerText).search(selectedText), finish = start+selectedText.length;