Replaces the current selection with a string.
The string must not contain any end-of-line character.
The method has no effect if the view is read-only.