---
title: "editor.insertText: Insert Text at the Caret — Sheet kit command — Kition"
description: "Types text at the caret of what is being typed (the cell, or a shape's text); with nothing typed, after the selected shape's text, else in the active cell: after what it holds with the cell left open (append, as inserting a symbol does), or in its place. A checkbox cell refuses it. With typing, only into what is being typed, else nothing (editing false). Answers where the text went."
canonical: "https://developer.kition.ai/docs/kits/sheet/commands/editor.insertText"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/sheet/commands/editor.insertText](https://developer.kition.ai/docs/kits/sheet/commands/editor.insertText)

# editor.insertText

**Insert Text at the Caret.** Types text at the caret of what is being typed (the cell, or a shape's text); with nothing typed, after the selected shape's text, else in the active cell: after what it holds with the cell left open (append, as inserting a symbol does), or in its place. A checkbox cell refuses it. With typing, only into what is being typed, else nothing (editing false). Answers where the text went.

- Kit: Sheet 0.1.0 (.xlsx (and opens .xlsm, .xls, .xltx, .csv, .ods, .xlsb)); reference: [Sheet kit commands](https://developer.kition.ai/docs/kits/sheet.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `append` | `boolean` | no | with nothing typed: after the active cell's text, the cell left open (default: in its place) |
| `text` | `string` | no | the text, 1 to 256 characters without control characters |
| `typing` | `boolean` | no |  |

## Call through sheet_run

```text
sheet_run {
  "path": "<file>.xlsx",
  "steps": [{ "command": "editor.insertText" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `append`, `text`, `typing`. sheet_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `editing` | `boolean` | no |  |
| `refused` | `string` | no |  |
| `shape` | `boolean` | no |  |

```json
{
  "additionalProperties": false,
  "properties": {
    "editing": {
      "type": "boolean"
    },
    "refused": {
      "type": "string"
    },
    "shape": {
      "type": "boolean"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "append": {
      "description": "with nothing typed: after the active cell's text, the cell left open (default: in its place)",
      "type": "boolean"
    },
    "text": {
      "description": "the text, 1 to 256 characters without control characters",
      "type": "string"
    },
    "typing": {
      "type": "boolean"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/sheet-darwin-arm64@0.1.0 and the kit itself (sheet_commands through @kition/cli@0.1.1, built from KitionAI/kition-sheet@82f13b2).
