---
title: "text.para: Paragraph Formatting — Layout kit command — Kition"
description: "Sets paragraph attributes on the selected paragraphs: alignment, indents, spacing, drop caps and more."
canonical: "https://developer.kition.ai/docs/kits/layout/commands/text.para"
---

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

# text.para

**Paragraph Formatting.** Sets paragraph attributes on the selected paragraphs: alignment, indents, spacing, drop caps and more.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `attrs` | `object` | no | {align?, leftIndent?, firstLineIndent?, spaceBefore?, spaceAfter?, dropCapLines?, hyphenate?, composer?, tabs?, ruleAbove?/ruleBelow?: {on?, weight?, color?, tint?, columnWidth?, offset?, leftIndent?, rightIndent?} (only the named rule fields change), …}; only the named rule fields change |
| `borderColor` | `string` | no |  |
| `grepStyles` | `object[]` | no |  |
| `nestedLineStyles` | `object[]` | no |  |
| `nestedStyles` | `object[]` | no |  |
| `ruleAbove` | `object` | no |  |
| `ruleBelow` | `object` | no |  |
| `shadingColor` | `string` | no |  |

## Call through layout_run

```text
layout_run {
  "path": "<file>.klayout",
  "steps": [{ "command": "text.para" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `attrs`, `borderColor`, `grepStyles`, `nestedLineStyles`, `nestedStyles`, `ruleAbove`, `ruleBelow`, `shadingColor`. layout_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": {
    "attrs": {
      "additionalProperties": true,
      "description": "{align?, leftIndent?, firstLineIndent?, spaceBefore?, spaceAfter?, dropCapLines?, hyphenate?, composer?, tabs?, ruleAbove?/ruleBelow?: {on?, weight?, color?, tint?, columnWidth?, offset?, leftIndent?, rightIndent?} (only the named rule fields change), …}; only the named rule fields change",
      "properties": {
        "align": {},
        "borderColor": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        },
        "composer": {},
        "dropCapLines": {},
        "firstLineIndent": {},
        "grepStyles": {
          "items": {
            "additionalProperties": true,
            "properties": {
              "style": {
                "type": "string",
                "x-khp-name": "characterName",
                "x-khp-role": "object",
                "x-khp-types": [
                  "Style"
                ]
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "hyphenate": {},
        "leftIndent": {},
        "nestedLineStyles": {
          "items": {
            "additionalProperties": true,
            "properties": {
              "style": {
                "type": "string",
                "x-khp-name": "characterName",
                "x-khp-role": "object",
                "x-khp-types": [
                  "Style"
                ]
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "nestedStyles": {
          "items": {
            "additionalProperties": true,
            "properties": {
              "style": {
                "type": "string",
                "x-khp-name": "characterName",
                "x-khp-role": "object",
                "x-khp-types": [
                  "Style"
                ]
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "ruleAbove": {
          "additionalProperties": true,
          "properties": {
            "color": {
              "type": "string",
              "x-khp-name": "name",
              "x-khp-role": "object",
              "x-khp-types": [
                "Swatch"
              ]
            }
          },
          "type": "object"
        },
        "ruleBelow": {
          "additionalProperties": true,
          "properties": {
            "color": {
              "type": "string",
              "x-khp-name": "name",
              "x-khp-role": "object",
              "x-khp-types": [
                "Swatch"
              ]
            }
          },
          "type": "object"
        },
        "shadingColor": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        },
        "spaceAfter": {},
        "spaceBefore": {},
        "tabs": {}
      },
      "type": "object"
    },
    "borderColor": {
      "type": "string",
      "x-khp-name": "name",
      "x-khp-types": [
        "Swatch"
      ]
    },
    "grepStyles": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "style": {
            "type": "string",
            "x-khp-name": "characterName",
            "x-khp-role": "object",
            "x-khp-types": [
              "Style"
            ]
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "nestedLineStyles": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "style": {
            "type": "string",
            "x-khp-name": "characterName",
            "x-khp-role": "object",
            "x-khp-types": [
              "Style"
            ]
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "nestedStyles": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "style": {
            "type": "string",
            "x-khp-name": "characterName",
            "x-khp-role": "object",
            "x-khp-types": [
              "Style"
            ]
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "ruleAbove": {
      "additionalProperties": true,
      "properties": {
        "color": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        }
      },
      "type": "object"
    },
    "ruleBelow": {
      "additionalProperties": true,
      "properties": {
        "color": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        }
      },
      "type": "object"
    },
    "shadingColor": {
      "type": "string",
      "x-khp-name": "name",
      "x-khp-types": [
        "Swatch"
      ]
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/layout-darwin-arm64@0.1.0 and the kit itself (layout_commands through @kition/cli@0.1.1, built from KitionAI/kition-layout@8767a18).
