<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[`Editor`](Editor) › [`replaceSelection`](Editor/replaceSelection)
## Editor.replaceSelection() method
0.11.11
**Signature:**
```typescript
abstract replaceSelection(replacement: string, origin?: string): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| <code>replacement</code> | <code>string</code> | |
| <code>origin</code> | <code>string</code> | _(Optional)_ |
**Returns:**
`void`