# social.respawn.richtext.facet

> Published by [respawn.social](https://lexicon.garden/identity/did:plc:hiabolqnnpdnrb5grmdaaepg)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:hiabolqnnpdnrb5grmdaaepg/social.respawn.richtext.facet)
- [Documentation](https://lexicon.garden/lexicon/did:plc:hiabolqnnpdnrb5grmdaaepg/social.respawn.richtext.facet/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:hiabolqnnpdnrb5grmdaaepg/social.respawn.richtext.facet/examples)

## Definitions

### `social.respawn.richtext.facet#bold`

**Type**: `object`

Facet feature for bold text.

| Property | Type | Required | Description |
|----------|------|----------|-------------|

### `social.respawn.richtext.facet#link`

**Type**: `object`

Facet feature for a URL.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (uri) | Yes |  |

### `social.respawn.richtext.facet`

**Type**: `object`

Annotation of a sub-string within rich text. Modeled on app.bsky.richtext.facet with Respawn-specific formatting features.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `index` | `ref` → `#byteSlice` | Yes |  |
| `features` | `array` | Yes |  |

### `social.respawn.richtext.facet#italic`

**Type**: `object`

Facet feature for italic text.

| Property | Type | Required | Description |
|----------|------|----------|-------------|

### `social.respawn.richtext.facet#spoiler`

**Type**: `object`

Facet feature marking a span as a spoiler. In display text the span is scrambled; the original text lives in the accompanying textWithSpoilers field.

| Property | Type | Required | Description |
|----------|------|----------|-------------|

### `social.respawn.richtext.facet#listItem`

**Type**: `object`

Facet feature for a list item span.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `ordered` | `boolean` | No | Whether the item belongs to an ordered (numbered) list. |

### `social.respawn.richtext.facet#byteSlice`

**Type**: `object`

Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `byteEnd` | `integer` | Yes |  |
| `byteStart` | `integer` | Yes |  |

### `social.respawn.richtext.facet#blockquote`

**Type**: `object`

Facet feature for a blockquote span.

| Property | Type | Required | Description |
|----------|------|----------|-------------|

## Raw Schema

```json
{
  "id": "social.respawn.richtext.facet",
  "defs": {
    "bold": {
      "type": "object",
      "properties": {},
      "description": "Facet feature for bold text."
    },
    "link": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri"
        }
      },
      "description": "Facet feature for a URL."
    },
    "main": {
      "type": "object",
      "required": [
        "index",
        "features"
      ],
      "properties": {
        "index": {
          "ref": "#byteSlice",
          "type": "ref"
        },
        "features": {
          "type": "array",
          "items": {
            "refs": [
              "#link",
              "#bold",
              "#italic",
              "#spoiler",
              "#blockquote",
              "#listItem"
            ],
            "type": "union"
          }
        }
      },
      "description": "Annotation of a sub-string within rich text. Modeled on app.bsky.richtext.facet with Respawn-specific formatting features."
    },
    "italic": {
      "type": "object",
      "properties": {},
      "description": "Facet feature for italic text."
    },
    "spoiler": {
      "type": "object",
      "properties": {},
      "description": "Facet feature marking a span as a spoiler. In display text the span is scrambled; the original text lives in the accompanying textWithSpoilers field."
    },
    "listItem": {
      "type": "object",
      "properties": {
        "ordered": {
          "type": "boolean",
          "description": "Whether the item belongs to an ordered (numbered) list."
        }
      },
      "description": "Facet feature for a list item span."
    },
    "byteSlice": {
      "type": "object",
      "required": [
        "byteStart",
        "byteEnd"
      ],
      "properties": {
        "byteEnd": {
          "type": "integer",
          "minimum": 0
        },
        "byteStart": {
          "type": "integer",
          "minimum": 0
        }
      },
      "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text."
    },
    "blockquote": {
      "type": "object",
      "properties": {},
      "description": "Facet feature for a blockquote span."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
