---
title: "editor.editText: Edit the Text Being Typed — Sheet kit command — Kition"
description: "The text keys of the cell being typed that hold Cmd: `selectAll` selects its text, `undo` takes back what was typed since the typing began (still typing), `copy` answers the selected text and `cut` takes it out too, `paste` types `text` over the selection (line breaks kept). Never changes the workbook or its undo history. With no cell being typed it does nothing and answers `editing: false`."
canonical: "https://developer.kition.ai/docs/kits/sheet/commands/editor.editText"
---

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

# editor.editText

**Edit the Text Being Typed.** The text keys of the cell being typed that hold Cmd: `selectAll` selects its text, `undo` takes back what was typed since the typing began (still typing), `copy` answers the selected text and `cut` takes it out too, `paste` types `text` over the selection (line breaks kept). Never changes the workbook or its undo history. With no cell being typed it does nothing and answers `editing: false`.

- 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 |
| --- | --- | --- | --- |
| `action` | `"selectAll" \| "undo" \| "copy" \| "cut" \| "paste"` | no | what to do |
| `text` | `string` | no | what `paste` types, at most 32767 characters |

## Call through sheet_run

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

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

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `editing` | `boolean` | no |  |
| `text` | `string` | no |  |

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

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "action": {
      "description": "what to do",
      "enum": [
        "selectAll",
        "undo",
        "copy",
        "cut",
        "paste"
      ],
      "type": "string"
    },
    "text": {
      "description": "what `paste` types, at most 32767 characters",
      "type": "string"
    }
  },
  "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).
