EditorState.replaceSelection method
EditorState › replaceSelection
Official
Create a transaction spec that replaces every selection range with the given content.Signature:
replaceSelection(text: string | Text): TransactionSpecParameters:
| Parameter | Type | Description |
|---|---|---|
| text | string | Text | The replacement text. |
Returns: TransactionSpec — The transaction spec.