net.atview.richtext.facet

atview.net

{
  "id": "net.atview.richtext.facet",
  "defs": {
    "b": {
      "type": "object",
      "properties": {},
      "description": "Bold inline emphasis."
    },
    "i": {
      "type": "object",
      "properties": {},
      "description": "Italic inline emphasis."
    },
    "u": {
      "type": "object",
      "properties": {},
      "description": "Underline inline emphasis."
    },
    "h2": {
      "type": "object",
      "properties": {},
      "description": "Level 2 heading block."
    },
    "h3": {
      "type": "object",
      "properties": {},
      "description": "Level 3 heading block."
    },
    "h4": {
      "type": "object",
      "properties": {},
      "description": "Level 4 heading block."
    },
    "h5": {
      "type": "object",
      "properties": {},
      "description": "Level 5 heading block."
    },
    "h6": {
      "type": "object",
      "properties": {},
      "description": "Level 6 heading block."
    },
    "ol": {
      "type": "object",
      "properties": {},
      "description": "Ordered list item block."
    },
    "ul": {
      "type": "object",
      "properties": {},
      "description": "Unordered list item block."
    },
    "code": {
      "type": "object",
      "properties": {},
      "description": "Inline monospace / code span."
    },
    "link": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri"
        }
      },
      "description": "Hyperlink inline feature."
    },
    "main": {
      "type": "object",
      "required": [
        "index",
        "features"
      ],
      "properties": {
        "index": {
          "ref": "#byteSlice",
          "type": "ref"
        },
        "features": {
          "type": "array",
          "items": {
            "refs": [
              "#b",
              "#i",
              "#u",
              "#code",
              "#strikethrough",
              "#highlight",
              "#link",
              "#mention",
              "#h2",
              "#h3",
              "#h4",
              "#h5",
              "#h6",
              "#blockquote",
              "#codeBlock",
              "#media",
              "#bskyPost",
              "#ul",
              "#ol",
              "#website",
              "#horizontalRule",
              "#iframe",
              "#math",
              "#hardBreak"
            ],
            "type": "union"
          }
        }
      },
      "description": "Annotation of a sub-string within the parent record's `textContent`. Byte offsets refer to a UTF-8 encoding of the string. A single facet may carry multiple features that all apply to the same byte range."
    },
    "math": {
      "type": "object",
      "required": [
        "tex"
      ],
      "properties": {
        "tex": {
          "type": "string",
          "maxLength": 20000,
          "maxGraphemes": 10000
        }
      },
      "description": "Math block expressed as TeX source."
    },
    "media": {
      "type": "object",
      "required": [
        "image"
      ],
      "properties": {
        "image": {
          "type": "blob",
          "accept": [
            "image/*"
          ],
          "maxSize": 5000000
        },
        "title": {
          "type": "string",
          "maxLength": 5000,
          "maxGraphemes": 500
        },
        "altText": {
          "type": "string",
          "maxLength": 10000,
          "maxGraphemes": 1000
        },
        "caption": {
          "type": "string",
          "maxLength": 10000,
          "maxGraphemes": 1000
        },
        "aspectRatio": {
          "ref": "#aspectRatio",
          "type": "ref"
        }
      },
      "description": "Inline/embedded media (image) with optional metadata."
    },
    "iframe": {
      "type": "object",
      "required": [
        "url"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "height": {
          "type": "integer",
          "minimum": 1
        }
      },
      "description": "Embedded iframe block."
    },
    "mention": {
      "type": "object",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        }
      },
      "description": "Mention of an account by DID."
    },
    "website": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri"
        },
        "title": {
          "type": "string",
          "maxLength": 5000,
          "maxGraphemes": 500
        }
      },
      "description": "External website embed."
    },
    "bskyPost": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        }
      },
      "description": "Embedded reference to a Bluesky post (app.bsky.feed.post)."
    },
    "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 in UTF-8 bytes."
    },
    "codeBlock": {
      "type": "object",
      "properties": {
        "language": {
          "type": "string",
          "maxLength": 100
        }
      },
      "description": "Fenced code block with optional language hint."
    },
    "hardBreak": {
      "type": "object",
      "properties": {},
      "description": "Hard line break within a paragraph."
    },
    "highlight": {
      "type": "object",
      "properties": {},
      "description": "Highlighted inline emphasis."
    },
    "blockquote": {
      "type": "object",
      "properties": {},
      "description": "Blockquote block."
    },
    "aspectRatio": {
      "type": "object",
      "required": [
        "width",
        "height"
      ],
      "properties": {
        "width": {
          "type": "integer",
          "minimum": 1
        },
        "height": {
          "type": "integer",
          "minimum": 1
        }
      },
      "description": "Width/height ratio of an image, in arbitrary same-unit pixels."
    },
    "strikethrough": {
      "type": "object",
      "properties": {},
      "description": "Strikethrough inline emphasis."
    },
    "horizontalRule": {
      "type": "object",
      "properties": {},
      "description": "Horizontal rule / thematic break block."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}

Validate Record

Validate a record against net.atview.richtext.facet

Validation Options
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:ycd3zyxa6iru5fiplr3un6nr
CID
bafyreiftimemvi6sjpogzfvj7zzihpvzkvkzxcd2l6cj6tfnafqxkqi5dm
Indexed At
2026-04-20 20:40 UTC
AT-URI
at://did:plc:ycd3zyxa6iru5fiplr3un6nr/com.atproto.lexicon.schema/net.atview.richtext.facet

Lexicon Garden

@