site.mochott.block

tokimeki.blue

Documentation

Record representing a custom block that can be inserted into articles by any user.

main record

Record representing a custom block that can be inserted into articles by any user.

Record Key tid Timestamp-based ID

Properties

category string Optional

Category for marketplace organization.

maxLength: 100 bytes
createdAt string datetime Required

Timestamp when the block was created.

css string Required

Scoped CSS for the block. Uses {{fieldKey}} placeholders for dynamic values like colors.

maxLength: 50000 bytes
description string Optional

Short description of the block's purpose and usage.

maxLength: 3000 bytesmaxGraphemes: 300 graphemes
fields array of ref #fieldDef Required

Field definitions for user-configurable parameters.

maxLength: 20 items
html string Required

HTML template. Uses {{fieldKey}} placeholders for dynamic values.

maxLength: 50000 bytes
name string Required

Display name of the block.

maxLength: 500 bytesmaxGraphemes: 50 graphemes
preview blob Optional

Preview thumbnail image for the block marketplace.

maxSize: 500.0 KB
updatedAt string datetime Optional

Timestamp when the block was last updated.

version integer Optional

Version number, incremented on each update.

minimum: 1
View raw schema
{
  "key": "tid",
  "type": "record",
  "record": {
    "type": "object",
    "required": [
      "name",
      "html",
      "css",
      "fields",
      "createdAt"
    ],
    "properties": {
      "css": {
        "type": "string",
        "maxLength": 50000,
        "description": "Scoped CSS for the block. Uses {{fieldKey}} placeholders for dynamic values like colors."
      },
      "html": {
        "type": "string",
        "maxLength": 50000,
        "description": "HTML template. Uses {{fieldKey}} placeholders for dynamic values."
      },
      "name": {
        "type": "string",
        "maxLength": 500,
        "description": "Display name of the block.",
        "maxGraphemes": 50
      },
      "fields": {
        "type": "array",
        "items": {
          "ref": "#fieldDef",
          "type": "ref"
        },
        "maxLength": 20,
        "description": "Field definitions for user-configurable parameters."
      },
      "preview": {
        "type": "blob",
        "accept": [
          "image/png",
          "image/jpeg",
          "image/webp"
        ],
        "maxSize": 500000,
        "description": "Preview thumbnail image for the block marketplace."
      },
      "version": {
        "type": "integer",
        "minimum": 1,
        "description": "Version number, incremented on each update."
      },
      "category": {
        "type": "string",
        "maxLength": 100,
        "description": "Category for marketplace organization."
      },
      "createdAt": {
        "type": "string",
        "format": "datetime",
        "description": "Timestamp when the block was created."
      },
      "updatedAt": {
        "type": "string",
        "format": "datetime",
        "description": "Timestamp when the block was last updated."
      },
      "description": {
        "type": "string",
        "maxLength": 3000,
        "description": "Short description of the block's purpose and usage.",
        "maxGraphemes": 300
      }
    }
  },
  "description": "Record representing a custom block that can be inserted into articles by any user."
}
fieldDef object

Definition of a single configurable field within a custom block.

Properties

default string Optional

Default value for the field.

maxLength: 5000 bytes
description string Optional

Help text shown to users when editing the field.

maxLength: 1000 bytesmaxGraphemes: 200 graphemes
key string Required

Unique identifier for the field, used as {{key}} in HTML/CSS templates.

maxLength: 64 bytes
label string Required

Display label shown to users in the editor.

maxLength: 200 bytesmaxGraphemes: 50 graphemes
options array of ref#selectOption Optional

Available options for select-type fields.

maxLength: 50 items
required boolean Optional

Whether this field must be filled in.

type string Required

Input type for the field.

Known values: text, textarea, color, image, url, number, select, boolean
View raw schema
{
  "type": "object",
  "required": [
    "key",
    "label",
    "type"
  ],
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 64,
      "description": "Unique identifier for the field, used as {{key}} in HTML/CSS templates."
    },
    "type": {
      "type": "string",
      "description": "Input type for the field.",
      "knownValues": [
        "text",
        "textarea",
        "color",
        "image",
        "url",
        "number",
        "select",
        "boolean"
      ]
    },
    "label": {
      "type": "string",
      "maxLength": 200,
      "description": "Display label shown to users in the editor.",
      "maxGraphemes": 50
    },
    "default": {
      "type": "string",
      "maxLength": 5000,
      "description": "Default value for the field."
    },
    "options": {
      "type": "array",
      "items": {
        "ref": "#selectOption",
        "type": "ref"
      },
      "maxLength": 50,
      "description": "Available options for select-type fields."
    },
    "required": {
      "type": "boolean",
      "description": "Whether this field must be filled in."
    },
    "description": {
      "type": "string",
      "maxLength": 1000,
      "description": "Help text shown to users when editing the field.",
      "maxGraphemes": 200
    }
  },
  "description": "Definition of a single configurable field within a custom block."
}
selectOption object

A single option for a select-type field.

Properties

label string Required

Display label for this option.

maxLength: 200 bytesmaxGraphemes: 50 graphemes
value string Required

The stored value when this option is selected.

maxLength: 200 bytes
View raw schema
{
  "type": "object",
  "required": [
    "value",
    "label"
  ],
  "properties": {
    "label": {
      "type": "string",
      "maxLength": 200,
      "description": "Display label for this option.",
      "maxGraphemes": 50
    },
    "value": {
      "type": "string",
      "maxLength": 200,
      "description": "The stored value when this option is selected."
    }
  },
  "description": "A single option for a select-type field."
}

Lexicon Garden

@