add(taSelection) add selection function

Some of the logic required for editing inline tags.