# InsertTextCommandOptions

interface

Interface with parameters for executing InsertTextCommand.

Both `range` and `selection` parameters are used for defining selection but should not be used together. If both are defined, only `selection` will be considered.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-typing/src/inserttextcommand.ts#L117)

<a id="properties">

## Properties

<a id="member-range">

### `range?: ModelRange`

The range in which the text is inserted. Defaults to the first range in the current selection.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-typing/src/inserttextcommand.ts#L134)

<a id="member-resultRange">

### `resultRange?: ModelRange`

The range where the selection should be placed after the insertion. If not specified, the selection will be placed right after the inserted text.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-typing/src/inserttextcommand.ts#L140)

<a id="member-selection">

### `selection?: ModelSelection | ModelDocumentSelection`

The selection in which the text is inserted. Inserting a text into a selection deletes the current content within selection ranges. If the selection is not specified, the current selection in the model will be used instead.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-typing/src/inserttextcommand.ts#L129)

<a id="member-text">

### `text?: string`

The text to be inserted.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-typing/src/inserttextcommand.ts#L122)

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
