Updates only selected text

Separated the walker function into a separate function that only transforms the selected text of the first and last text nodes. Previously it would transform all the text of the first and last nodes, whether that text was selected or not.

Should solve issue #5, although the problem isn't limited to the inline editor and this solution retains styles and formatting, unlike the suggested code there.