# blue.backyard.richtext.facet

> Published by [backyard.blue](https://lexicon.garden/identity/did:plc:achxuyl54r4cfkkkycp46yhg)

✓ 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:achxuyl54r4cfkkkycp46yhg/blue.backyard.richtext.facet)
- [Documentation](https://lexicon.garden/lexicon/did:plc:achxuyl54r4cfkkkycp46yhg/blue.backyard.richtext.facet/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:achxuyl54r4cfkkkycp46yhg/blue.backyard.richtext.facet/examples)

## Definitions

### `blue.backyard.richtext.facet#tag`

**Type**: `object`

Facet feature for a hashtag.

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

### `blue.backyard.richtext.facet#bold`

**Type**: `object`

Facet feature for bold text formatting. Spec candidate per Paul Frazee.

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

### `blue.backyard.richtext.facet#link`

**Type**: `object`

Facet feature for a URL link.

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

### `blue.backyard.richtext.facet`

**Type**: `object`

Annotation of a sub-string within rich text.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `index` | `ref` → `#byteSlice` | Yes |  |
| `features` | `array` | Yes | The feature types applied to this text range (e.g. link, mention, formatting). |

### `blue.backyard.richtext.facet#italic`

**Type**: `object`

Facet feature for italic text formatting. Spec candidate per Paul Frazee.

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

### `blue.backyard.richtext.facet#mention`

**Type**: `object`

Facet feature for mention of another account.

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

### `blue.backyard.richtext.facet#byteSlice`

**Type**: `object`

Specifies a sub-string in a utf-8 string by byte index.

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

### `blue.backyard.richtext.facet#underline`

**Type**: `object`

Facet feature for underline text formatting. Spec candidate per Paul Frazee.

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

### `blue.backyard.richtext.facet#strikethrough`

**Type**: `object`

Facet feature for strikethrough text formatting. Spec candidate per Paul Frazee.

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

## Raw Schema

```json
{
  "id": "blue.backyard.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 formatting. Spec candidate per Paul Frazee."
    },
    "link": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri"
        }
      },
      "description": "Facet feature for a URL link."
    },
    "main": {
      "type": "object",
      "required": [
        "index",
        "features"
      ],
      "properties": {
        "index": {
          "ref": "#byteSlice",
          "type": "ref"
        },
        "features": {
          "type": "array",
          "items": {
            "refs": [
              "#mention",
              "#link",
              "#tag",
              "#bold",
              "#italic",
              "#underline",
              "#strikethrough"
            ],
            "type": "union"
          },
          "description": "The feature types applied to this text range (e.g. link, mention, formatting)."
        }
      },
      "description": "Annotation of a sub-string within rich text."
    },
    "italic": {
      "type": "object",
      "properties": {},
      "description": "Facet feature for italic text formatting. Spec candidate per Paul Frazee."
    },
    "mention": {
      "type": "object",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        }
      },
      "description": "Facet feature for mention of another account."
    },
    "byteSlice": {
      "type": "object",
      "required": [
        "byteStart",
        "byteEnd"
      ],
      "properties": {
        "byteEnd": {
          "type": "integer",
          "minimum": 0
        },
        "byteStart": {
          "type": "integer",
          "minimum": 0
        }
      },
      "description": "Specifies a sub-string in a utf-8 string by byte index."
    },
    "underline": {
      "type": "object",
      "properties": {},
      "description": "Facet feature for underline text formatting. Spec candidate per Paul Frazee."
    },
    "strikethrough": {
      "type": "object",
      "properties": {},
      "description": "Facet feature for strikethrough text formatting. Spec candidate per Paul Frazee."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "Annotation of a sub-string within rich text."
}
```
