adding hooks for applying text node changes, issue #49