---
title: "text.addInPath: Area / Path Type — Vector kit command — Kition"
description: "Puts new type inside a closed path (area type) or along a path (type on a path) with text, font and fit options; answers its id."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/text.addInPath"
---

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

# text.addInPath

**Area / Path Type.** Puts new type inside a closed path (area type) or along a path (type on a path) with text, font and fit options; answers its id.

- Kit: Vector 0.1.0 (.kvector); reference: [Vector kit commands](https://developer.kition.ai/docs/kits/vector.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `at` | `number[]` | no | on-path start: nearest point |
| `charAlign` | `string` | no |  |
| `color` | `string` | no | as text.add |
| `fit` | `"none" \| "autoHeight" \| "shrinkText"` | no |  |
| `fitMinPercent` | `number` | no |  |
| `font` | `string` | no |  |
| `leadingModel` | `"romanBaseline" \| "emBoxTop"` | no |  |
| `mode` | `"area" \| "onPath"` | no |  |
| `path` | `integer` | no | object ID |
| `placeholder` | `boolean` | no | placeholder text instead, as text.add |
| `size` | `number` | no |  |
| `style` | `string` | no |  |
| `text` | `string` | no | like  |
| `vertical` | `boolean` | no |  |

## Call through vector_run

```text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "text.addInPath" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `at`, `charAlign`, `color`, `fit`, `fitMinPercent`, `font`, `leadingModel`, `mode`, `path`, `placeholder`, `size`, `style`, `text`, `vertical`. vector_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": {
    "at": {
      "description": "on-path start: nearest point",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "charAlign": {
      "type": "string"
    },
    "color": {
      "description": "as text.add",
      "type": "string"
    },
    "fit": {
      "enum": [
        "none",
        "autoHeight",
        "shrinkText"
      ],
      "type": "string"
    },
    "fitMinPercent": {
      "type": "number"
    },
    "font": {
      "type": "string"
    },
    "leadingModel": {
      "enum": [
        "romanBaseline",
        "emBoxTop"
      ],
      "type": "string"
    },
    "mode": {
      "enum": [
        "area",
        "onPath"
      ],
      "type": "string"
    },
    "path": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "placeholder": {
      "description": "placeholder text instead, as text.add",
      "type": "boolean"
    },
    "size": {
      "type": "number"
    },
    "style": {
      "type": "string"
    },
    "text": {
      "description": "like ",
      "type": "string"
    },
    "vertical": {
      "default": false,
      "type": "boolean"
    }
  },
  "returns": "{id}",
  "type": "object"
}
```

Generated from the command list of @kition/vector-darwin-arm64@0.1.0 and the kit itself (vector_commands through @kition/cli@0.1.1, built from KitionAI/kition-vector@7cf908f).
