DOM Range API functions for simple text editing purpose, for modern browsers.