# blog.pckt.richtext.facet

> Published by [pckt.blog](https://lexicon.garden/identity/did:plc:revjuqmkvrw6fnkxppqtszpv)

✓ This is the authoritative definition for this NSID.

## Description

Annotation of a sub-string within rich text.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:revjuqmkvrw6fnkxppqtszpv/blog.pckt.richtext.facet)
- [Documentation](https://lexicon.garden/lexicon/did:plc:revjuqmkvrw6fnkxppqtszpv/blog.pckt.richtext.facet/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:revjuqmkvrw6fnkxppqtszpv/blog.pckt.richtext.facet/examples)

## Definitions

### `blog.pckt.richtext.facet#atMention`

**Type**: `object`

Facet feature for mentioning an AT URI

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

### `blog.pckt.richtext.facet#bold`

**Type**: `object`

Facet feature for bold text

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

### `blog.pckt.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 |  |

### `blog.pckt.richtext.facet#code`

**Type**: `object`

Facet feature for inline code

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

### `blog.pckt.richtext.facet#didMention`

**Type**: `object`

Facet feature for mentioning a DID

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

### `blog.pckt.richtext.facet#footnote`

**Type**: `object`

Facet feature for a footnote reference

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `contentFacets` | `array` | No |  |
| `contentPlaintext` | `string` | Yes |  |
| `footnoteId` | `string` | Yes |  |

### `blog.pckt.richtext.facet#highlight`

**Type**: `object`

Facet feature for highlighted text

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

### `blog.pckt.richtext.facet#id`

**Type**: `object`

Facet feature for an identifier. Used for linking to a segment

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | No |  |

### `blog.pckt.richtext.facet#italic`

**Type**: `object`

Facet feature for italic text

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

### `blog.pckt.richtext.facet#link`

**Type**: `object`

Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.

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

### `blog.pckt.richtext.facet`

**Type**: `object`

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

### `blog.pckt.richtext.facet#strikethrough`

**Type**: `object`

Facet feature for strikethrough markup

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

### `blog.pckt.richtext.facet#underline`

**Type**: `object`

Facet feature for underline markup

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

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "atMention": {
      "description": "Facet feature for mentioning an AT URI",
      "properties": {
        "atURI": {
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "atURI"
      ],
      "type": "object"
    },
    "bold": {
      "description": "Facet feature for bold text",
      "properties": {},
      "type": "object"
    },
    "byteSlice": {
      "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.",
      "properties": {
        "byteEnd": {
          "minimum": 0,
          "type": "integer"
        },
        "byteStart": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "byteStart",
        "byteEnd"
      ],
      "type": "object"
    },
    "code": {
      "description": "Facet feature for inline code",
      "properties": {},
      "type": "object"
    },
    "didMention": {
      "description": "Facet feature for mentioning a DID",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    },
    "footnote": {
      "description": "Facet feature for a footnote reference",
      "properties": {
        "contentFacets": {
          "items": {
            "ref": "#main",
            "type": "ref"
          },
          "type": "array"
        },
        "contentPlaintext": {
          "type": "string"
        },
        "footnoteId": {
          "type": "string"
        }
      },
      "required": [
        "footnoteId",
        "contentPlaintext"
      ],
      "type": "object"
    },
    "highlight": {
      "description": "Facet feature for highlighted text",
      "properties": {},
      "type": "object"
    },
    "id": {
      "description": "Facet feature for an identifier. Used for linking to a segment",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "italic": {
      "description": "Facet feature for italic text",
      "properties": {},
      "type": "object"
    },
    "link": {
      "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.",
      "properties": {
        "uri": {
          "type": "string"
        }
      },
      "required": [
        "uri"
      ],
      "type": "object"
    },
    "main": {
      "properties": {
        "features": {
          "items": {
            "refs": [
              "#link",
              "#didMention",
              "#atMention",
              "#code",
              "#highlight",
              "#underline",
              "#strikethrough",
              "#id",
              "#bold",
              "#italic",
              "#footnote"
            ],
            "type": "union"
          },
          "type": "array"
        },
        "index": {
          "ref": "#byteSlice",
          "type": "ref"
        }
      },
      "required": [
        "index",
        "features"
      ],
      "type": "object"
    },
    "strikethrough": {
      "description": "Facet feature for strikethrough markup",
      "properties": {},
      "type": "object"
    },
    "underline": {
      "description": "Facet feature for underline markup",
      "properties": {},
      "type": "object"
    }
  },
  "description": "Annotation of a sub-string within rich text.",
  "id": "blog.pckt.richtext.facet",
  "lexicon": 1
}
```
