Para inputs existe un proyecto a parte.
https://code.google.com/p/rangy/
Como implementan GetSelection y document.selection
https://github.com/timdown/rangy/blob/master/src/core/wrappedselection.js#L44-L85
deleteFromDocument
https://github.com/timdown/rangy/blob/master/src/core/wrappedselection.js#L833-L835
Selection and ranges in javascript
http://help.dottoro.com/ljfjepre.php
https://code.google.com/p/rangy/
Como implementan GetSelection y document.selection
https://github.com/timdown/rangy/blob/master/src/core/wrappedselection.js#L44-L85
deleteFromDocument
https://github.com/timdown/rangy/blob/master/src/core/wrappedselection.js#L833-L835
Selection and ranges in javascript
http://help.dottoro.com/ljfjepre.php