# app.atmobb.richtext.facet

> Published by [lexicons.atmobb.app](https://lexicon.garden/identity/did:plc:dqnwiguwsbb6uwrm7a2rsff2)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:dqnwiguwsbb6uwrm7a2rsff2/app.atmobb.richtext.facet)
- [Documentation](https://lexicon.garden/lexicon/did:plc:dqnwiguwsbb6uwrm7a2rsff2/app.atmobb.richtext.facet/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:dqnwiguwsbb6uwrm7a2rsff2/app.atmobb.richtext.facet/examples)

## Definitions

### `app.atmobb.richtext.facet#tag`

**Type**: `object`

A hashtag.

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

### `app.atmobb.richtext.facet#bold`

**Type**: `object`

Bold text.

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

### `app.atmobb.richtext.facet#code`

**Type**: `object`

Inline code.

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

### `app.atmobb.richtext.facet#link`

**Type**: `object`

A hyperlink.

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

### `app.atmobb.richtext.facet`

**Type**: `object`

Annotation of a sub-string within rich text.

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

### `app.atmobb.richtext.facet#italic`

**Type**: `object`

Italic text.

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

### `app.atmobb.richtext.facet#mention`

**Type**: `object`

A mention of another account.

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

### `app.atmobb.richtext.facet#spoiler`

**Type**: `object`

Spoiler text, hidden until revealed. A forum culture essential.

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

### `app.atmobb.richtext.facet#byteSlice`

**Type**: `object`

Sub-string range as byte offsets into the UTF-8 text.

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

### `app.atmobb.richtext.facet#underline`

**Type**: `object`

Underlined text. A BBCode heritage feature.

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

### `app.atmobb.richtext.facet#strikethrough`

**Type**: `object`

Struck-through text.

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

## Raw Schema

```json
{
  "id": "app.atmobb.richtext.facet",
  "defs": {
    "tag": {
      "type": "object",
      "required": [
        "tag"
      ],
      "properties": {
        "tag": {
          "type": "string",
          "maxLength": 640,
          "maxGraphemes": 64
        }
      },
      "description": "A hashtag."
    },
    "bold": {
      "type": "object",
      "properties": {},
      "description": "Bold text."
    },
    "code": {
      "type": "object",
      "properties": {},
      "description": "Inline code."
    },
    "link": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri"
        }
      },
      "description": "A hyperlink."
    },
    "main": {
      "type": "object",
      "required": [
        "index",
        "features"
      ],
      "properties": {
        "index": {
          "ref": "#byteSlice",
          "type": "ref"
        },
        "features": {
          "type": "array",
          "items": {
            "refs": [
              "#bold",
              "#italic",
              "#underline",
              "#strikethrough",
              "#code",
              "#spoiler",
              "#link",
              "#mention",
              "#tag"
            ],
            "type": "union"
          }
        }
      },
      "description": "Annotation of a sub-string within rich text."
    },
    "italic": {
      "type": "object",
      "properties": {},
      "description": "Italic text."
    },
    "mention": {
      "type": "object",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        }
      },
      "description": "A mention of another account."
    },
    "spoiler": {
      "type": "object",
      "properties": {},
      "description": "Spoiler text, hidden until revealed. A forum culture essential."
    },
    "byteSlice": {
      "type": "object",
      "required": [
        "byteStart",
        "byteEnd"
      ],
      "properties": {
        "byteEnd": {
          "type": "integer",
          "minimum": 0
        },
        "byteStart": {
          "type": "integer",
          "minimum": 0
        }
      },
      "description": "Sub-string range as byte offsets into the UTF-8 text."
    },
    "underline": {
      "type": "object",
      "properties": {},
      "description": "Underlined text. A BBCode heritage feature."
    },
    "strikethrough": {
      "type": "object",
      "properties": {},
      "description": "Struck-through text."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
