---
title: "format.state: Formatting at Selection — Doc kit command — Kition"
description: "Answers the character and paragraph formatting at the selection (font, size, bold, italic, style, alignment…), as the ribbon shows it; on Chinese, Japanese or Korean text (`eastAsian`) the Font box shows the East Asian font (`fontEa`), and `fontShown` names the family that draws the shown font when this engine has no face of that name."
canonical: "https://developer.kition.ai/docs/kits/doc/commands/format.state"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/doc/commands/format.state](https://developer.kition.ai/docs/kits/doc/commands/format.state)

# format.state

**Formatting at Selection.** Answers the character and paragraph formatting at the selection (font, size, bold, italic, style, alignment…), as the ribbon shows it; on Chinese, Japanese or Korean text (`eastAsian`) the Font box shows the East Asian font (`fontEa`), and `fontShown` names the family that draws the shown font when this engine has no face of that name.

- Kit: Doc 0.1.0 (.docx); reference: [Doc kit commands](https://developer.kition.ai/docs/kits/doc.md)
- Changes the document: no

## Parameters

None.

## Call through doc_run

```text
doc_run {
  "path": "<file>.docx",
  "steps": [{ "command": "format.state" }]
}
```

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

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `bold` | `boolean` | no |  |
| `border` | `boolean` | no |  |
| `color` | `string` | no |  |
| `eastAsian` | `boolean` | no |  |
| `font` | `string` | no |  |
| `fontEa` | `string` | no |  |
| `fontShown` | `any` | no |  |
| `highlight` | `any` | no |  |
| `italic` | `boolean` | no |  |
| `size` | `number` | no |  |
| `strike` | `boolean` | no |  |
| `style` | `string` | no |  |
| `styleName` | `string` | no |  |
| `subscript` | `boolean` | no |  |
| `superscript` | `boolean` | no |  |
| `underline` | `boolean` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "bold": {
      "type": "boolean"
    },
    "border": {
      "type": "boolean"
    },
    "color": {
      "type": "string"
    },
    "eastAsian": {
      "type": "boolean"
    },
    "font": {
      "type": "string"
    },
    "fontEa": {
      "type": "string"
    },
    "fontShown": {},
    "highlight": {},
    "italic": {
      "type": "boolean"
    },
    "size": {
      "type": "number"
    },
    "strike": {
      "type": "boolean"
    },
    "style": {
      "type": "string"
    },
    "styleName": {
      "type": "string"
    },
    "subscript": {
      "type": "boolean"
    },
    "superscript": {
      "type": "boolean"
    },
    "underline": {
      "type": "boolean"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/doc-darwin-arm64@0.1.0 and the kit itself (doc_commands through @kition/cli@0.1.1, built from KitionAI/kition-doc@41e14a8).
