# is.logue.richtext.facet

> Published by [logue.is](https://lexicon.garden/identity/did:plc:6xpq2upvl7j6p3ct6rgbb4pd)

## Description

Annotation of a sub-string within rich text.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:6xpq2upvl7j6p3ct6rgbb4pd/is.logue.richtext.facet)
- [Documentation](https://lexicon.garden/lexicon/did:plc:6xpq2upvl7j6p3ct6rgbb4pd/is.logue.richtext.facet/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:6xpq2upvl7j6p3ct6rgbb4pd/is.logue.richtext.facet/examples)

## Definitions

### `is.logue.richtext.facet#id`

**Type**: `object`

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

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

### `is.logue.richtext.facet#bold`

**Type**: `object`

Facet feature for bold text

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

### `is.logue.richtext.facet#code`

**Type**: `object`

Facet feature for inline code

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

### `is.logue.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 |  |

### `is.logue.richtext.facet`

**Type**: `object`

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

### `is.logue.richtext.facet#italic`

**Type**: `object`

Facet feature for italic text

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

### `is.logue.richtext.facet#atMention`

**Type**: `object`

Facet feature for mentioning an AT URI

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

### `is.logue.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 |  |

### `is.logue.richtext.facet#highlight`

**Type**: `object`

Facet feature for highlighted text

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

### `is.logue.richtext.facet#underline`

**Type**: `object`

Facet feature for underline markup

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

### `is.logue.richtext.facet#didMention`

**Type**: `object`

Facet feature for mentioning a DID

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

### `is.logue.richtext.facet#strikethrough`

**Type**: `object`

Facet feature for strikethrough markup

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

## Raw Schema

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