Use range to calculate position of text node