---
title: "element.setText: Edit text — Board kit command — Kition"
description: "Replaces the whole text of a shape, text element, connector label, card caption or frame title."
canonical: "https://developer.kition.ai/docs/kits/board/commands/element.setText"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/board/commands/element.setText](https://developer.kition.ai/docs/kits/board/commands/element.setText)

# element.setText

**Edit text.** Replaces the whole text of a shape, text element, connector label, card caption or frame title.

- Kit: Board 0.1.0 (.kboard); reference: [Board kit commands](https://developer.kition.ai/docs/kits/board.md)
- Changes the document: yes
- Acts on: `id` (one id), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A shape, text, connector, card or frame |
| `text` | `string` | yes | The whole new text |

## Call through board_run

```text
board_run {
  "path": "<file>.kboard",
  "steps": [{ "command": "element.setText", "params": { "id": <string>, "text": <string> } }]
}
```

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

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "description": "A shape, text, connector, card or frame",
      "type": "string",
      "x-khp-types": [
        "Element"
      ]
    },
    "text": {
      "description": "The whole new text",
      "type": "string"
    }
  },
  "required": [
    "id",
    "text"
  ],
  "type": "object"
}
```

Generated from the command list of @kition/board-darwin-arm64@0.1.0 and the kit itself (board_commands through @kition/cli@0.1.1, built from KitionAI/kition-board@e78c190).
