# social.colibri.richtext.facet

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

✓ This is the authoritative definition for this NSID.

## Links

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

## Definitions

### `social.colibri.richtext.facet#bold`

**Type**: `object`

A facet feature for bold text.

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

### `social.colibri.richtext.facet#code`

**Type**: `object`

A facet feature for inline code text.

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

### `social.colibri.richtext.facet#link`

**Type**: `object`

A facet feature for a hyperlink.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (uri) | Yes | The URI of the link. |

### `social.colibri.richtext.facet`

**Type**: `object`

A rich text facet annotation on a message.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `index` | `ref` → `lex:social.colibri.richtext.facet#byteSlice` | Yes |  |
| `features` | `array` | Yes | The features of this facet. |

### `social.colibri.richtext.facet#italic`

**Type**: `object`

A facet feature for italic text.

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

### `social.colibri.richtext.facet#channel`

**Type**: `object`

A facet feature for a channel reference.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `channel` | `string` (record-key) | Yes | The record key of the referenced channel. |

### `social.colibri.richtext.facet#mention`

**Type**: `object`

A facet feature for a user mention.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | The DID of the mentioned user. |

### `social.colibri.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-based, counting bytes of the UTF-8 encoded text.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `byteEnd` | `integer` | Yes | The end index of the byte slice (exclusive). |
| `byteStart` | `integer` | Yes | The start index of the byte slice (inclusive). |

### `social.colibri.richtext.facet#underline`

**Type**: `object`

A facet feature for underlined text.

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

### `social.colibri.richtext.facet#strikethrough`

**Type**: `object`

A facet feature for strikethrough text.

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

## Raw Schema

```json
{
  "id": "social.colibri.richtext.facet",
  "defs": {
    "bold": {
      "type": "object",
      "properties": {},
      "description": "A facet feature for bold text."
    },
    "code": {
      "type": "object",
      "properties": {},
      "description": "A facet feature for inline code text."
    },
    "link": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri",
          "description": "The URI of the link."
        }
      },
      "description": "A facet feature for a hyperlink."
    },
    "main": {
      "type": "object",
      "required": [
        "index",
        "features"
      ],
      "properties": {
        "index": {
          "ref": "lex:social.colibri.richtext.facet#byteSlice",
          "type": "ref"
        },
        "features": {
          "type": "array",
          "items": {
            "refs": [
              "lex:social.colibri.richtext.facet#channel",
              "lex:social.colibri.richtext.facet#bold",
              "lex:social.colibri.richtext.facet#italic",
              "lex:social.colibri.richtext.facet#underline",
              "lex:social.colibri.richtext.facet#strikethrough",
              "lex:social.colibri.richtext.facet#code",
              "lex:social.colibri.richtext.facet#mention",
              "lex:social.colibri.richtext.facet#link"
            ],
            "type": "union"
          },
          "description": "The features of this facet."
        }
      },
      "description": "A rich text facet annotation on a message."
    },
    "italic": {
      "type": "object",
      "properties": {},
      "description": "A facet feature for italic text."
    },
    "channel": {
      "type": "object",
      "required": [
        "channel"
      ],
      "properties": {
        "channel": {
          "type": "string",
          "format": "record-key",
          "description": "The record key of the referenced channel."
        }
      },
      "description": "A facet feature for a channel reference."
    },
    "mention": {
      "type": "object",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did",
          "description": "The DID of the mentioned user."
        }
      },
      "description": "A facet feature for a user mention."
    },
    "byteSlice": {
      "type": "object",
      "required": [
        "byteStart",
        "byteEnd"
      ],
      "properties": {
        "byteEnd": {
          "type": "integer",
          "minimum": 0,
          "description": "The end index of the byte slice (exclusive)."
        },
        "byteStart": {
          "type": "integer",
          "minimum": 0,
          "description": "The start index of the byte slice (inclusive)."
        }
      },
      "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-based, counting bytes of the UTF-8 encoded text."
    },
    "underline": {
      "type": "object",
      "properties": {},
      "description": "A facet feature for underlined text."
    },
    "strikethrough": {
      "type": "object",
      "properties": {},
      "description": "A facet feature for strikethrough text."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
