Added support for calling replaceText with a string