# games.gamesgamesgamesgames.richtext.facet

> Published by [gamesgamesgamesgames.games](https://lexicon.garden/identity/did:web:gamesgamesgamesgames.games)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:gamesgamesgamesgames.games/games.gamesgamesgamesgames.richtext.facet)
- [Documentation](https://lexicon.garden/lexicon/did:web:gamesgamesgamesgames.games/games.gamesgamesgamesgames.richtext.facet/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:gamesgamesgamesgames.games/games.gamesgamesgamesgames.richtext.facet/examples)

## Definitions

### `games.gamesgamesgamesgames.richtext.facet#tag`

**Type**: `object`

Facet feature for a hashtag.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tag` | `string` | Yes |  |

### `games.gamesgamesgamesgames.richtext.facet#bold`

**Type**: `object`

Facet feature for bold text.

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

### `games.gamesgamesgamesgames.richtext.facet#link`

**Type**: `object`

Facet feature for a URL.

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

### `games.gamesgamesgamesgames.richtext.facet`

**Type**: `object`

Annotation of a sub-string within rich text.

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

### `games.gamesgamesgamesgames.richtext.facet#image`

**Type**: `object`

Facet feature for an inline image.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `alt` | `string` | No |  |
| `blob` | `blob` | Yes |  |
| `width` | `integer` | No |  |
| `height` | `integer` | No |  |

### `games.gamesgamesgamesgames.richtext.facet#video`

**Type**: `object`

Facet feature for an inline video.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `alt` | `string` | No |  |
| `uri` | `string` (uri) | No |  |
| `blob` | `blob` | No |  |

### `games.gamesgamesgamesgames.richtext.facet#italic`

**Type**: `object`

Facet feature for italic text.

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

### `games.gamesgamesgamesgames.richtext.facet#heading`

**Type**: `object`

Facet feature for a section heading.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `level` | `integer` | Yes |  |

### `games.gamesgamesgamesgames.richtext.facet#mention`

**Type**: `object`

Facet feature for mention of another account.

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

### `games.gamesgamesgamesgames.richtext.facet#listItem`

**Type**: `object`

Facet feature marking text as a list item.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `depth` | `integer` | No |  |
| `ordered` | `boolean` | No |  |

### `games.gamesgamesgamesgames.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 |  |

## Raw Schema

```json
{
  "id": "games.gamesgamesgamesgames.richtext.facet",
  "defs": {
    "tag": {
      "type": "object",
      "required": [
        "tag"
      ],
      "properties": {
        "tag": {
          "type": "string",
          "maxLength": 640,
          "maxGraphemes": 64
        }
      },
      "description": "Facet feature for a hashtag."
    },
    "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": [
              "#mention",
              "#link",
              "#tag",
              "#bold",
              "#italic",
              "#heading",
              "#listItem",
              "#image",
              "#video"
            ],
            "type": "union"
          }
        }
      },
      "description": "Annotation of a sub-string within rich text."
    },
    "image": {
      "type": "object",
      "required": [
        "blob"
      ],
      "properties": {
        "alt": {
          "type": "string"
        },
        "blob": {
          "type": "blob",
          "accept": [
            "image/*"
          ],
          "maxSize": 10000000
        },
        "width": {
          "type": "integer"
        },
        "height": {
          "type": "integer"
        }
      },
      "description": "Facet feature for an inline image."
    },
    "video": {
      "type": "object",
      "properties": {
        "alt": {
          "type": "string"
        },
        "uri": {
          "type": "string",
          "format": "uri"
        },
        "blob": {
          "type": "blob",
          "accept": [
            "video/*"
          ],
          "maxSize": 200000000
        }
      },
      "description": "Facet feature for an inline video."
    },
    "italic": {
      "type": "object",
      "properties": {},
      "description": "Facet feature for italic text."
    },
    "heading": {
      "type": "object",
      "required": [
        "level"
      ],
      "properties": {
        "level": {
          "type": "integer",
          "maximum": 6,
          "minimum": 1
        }
      },
      "description": "Facet feature for a section heading."
    },
    "mention": {
      "type": "object",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        }
      },
      "description": "Facet feature for mention of another account."
    },
    "listItem": {
      "type": "object",
      "properties": {
        "depth": {
          "type": "integer",
          "default": 0,
          "minimum": 0
        },
        "ordered": {
          "type": "boolean"
        }
      },
      "description": "Facet feature marking text as a list item."
    },
    "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."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
