When text is added to a row, lets keep track of its position its added at and keep a list of text at positions, stored in plain text. When a position known to have text is selected, we can simply refer to the list of text at positions. Likewise, we can keep track of where links are using this.