---
title: "text.mark: Format text — Board kit command — Kition"
description: "Applies or removes bold, italic or a link on a character range of one element's text."
canonical: "https://developer.kition.ai/docs/kits/board/commands/text.mark"
---

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

# text.mark

**Format text.** Applies or removes bold, italic or a link on a character range of one element's text.

- 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 | The element |
| `mark` | `"bold" \| "italic" \| "link"` | yes | The mark |
| `range` | `integer[]` | yes | [start, end) in characters |
| `units` | `"scalar" \| "utf16"` | no | How range counts: characters (default) or UTF-16 code units |
| `value` | `any` | no | true (bold, italic), { href } (link), or null to remove |

## Call through board_run

```text
board_run {
  "path": "<file>.kboard",
  "steps": [{ "command": "text.mark", "params": { "id": <string>, "mark": <"bold" | "italic" | "link">, "range": <integer[]> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `units`, `value`. 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": "The element",
      "type": "string",
      "x-khp-types": [
        "Element"
      ]
    },
    "mark": {
      "description": "The mark",
      "enum": [
        "bold",
        "italic",
        "link"
      ],
      "type": "string"
    },
    "range": {
      "description": "[start, end) in characters",
      "items": {
        "minimum": 0,
        "type": "integer"
      },
      "type": "array"
    },
    "units": {
      "description": "How range counts: characters (default) or UTF-16 code units",
      "enum": [
        "scalar",
        "utf16"
      ],
      "type": "string"
    },
    "value": {
      "description": "true (bold, italic), { href } (link), or null to remove"
    }
  },
  "required": [
    "id",
    "mark",
    "range"
  ],
  "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).
