replace

Replaces a context's selection. Fails for an unknown context, an object not in the document, or an invalid region.