Polotno Docs

TableCell

Documentation for the TableCell schema definition in the Polotno Design JSON Schema.

TableCell

Type Information

Base Type: object

Properties

PropertyTypeDescription
alignstringText alignment. Inherits from table align.
bordersCellBordersPer-side border overrides. Absent sides inherit from the table's border properties.
cellBackgroundstringCell background color (CSS color string). Inherits from table cellBackground.
cellPaddingnumberCell inner padding in pixels. Inherits from table cellPadding.
colSpannumberNumber of columns this cell spans. Defaults to 1.
customunknownCustom data attached to the cell.
fillstringText color (CSS color string). Inherits from table fill.
fontFamilystringFont family name. Inherits from table fontFamily.
fontSizenumberFont size in pixels. Inherits from table fontSize.
fontStylestringFont style: 'normal' or 'italic'. Inherits from table fontStyle.
fontWeightstringFont weight: 'normal', 'bold', or numeric string. Inherits from table fontWeight.
idstringUnique identifier for the cell.
letterSpacingnumberLetter spacing as percentage of font size. Inherits from table letterSpacing.
lineHeightnumber | stringLine height multiplier or string value. Inherits from table lineHeight.
mergedIntostringID of the cell this cell is merged into. When set, this cell is hidden and its space is consumed by the target cell.
namestringDisplay name for the cell.
opacitynumberCell opacity (0-1). Defaults to 1.
rowSpannumberNumber of rows this cell spans. Defaults to 1.
strokestringText stroke color. Inherits from table stroke.
strokeWidthnumberText stroke width in pixels. Inherits from table strokeWidth.
textstringCell text content.
textDecorationstringText decoration: 'underline', 'line-through', or empty string. Inherits from table textDecoration.
textTransformstringText transform: 'uppercase', 'lowercase', 'capitalize', 'none'. Inherits from table textTransform.
type"tablecell"Element type identifier.
verticalAlignstringVertical text alignment. Inherits from table verticalAlign.

JSON Schema

{
  "additionalProperties": false,
  "properties": {
    "align": {
      "description": "Text alignment. Inherits from table align.",
      "type": "string"
    },
    "borders": {
      "$ref": "#/definitions/CellBorders",
      "description": "Per-side border overrides. Absent sides inherit from the table's border properties."
    },
    "cellBackground": {
      "description": "Cell background color (CSS color string). Inherits from table cellBackground.",
      "type": "string"
    },
    "cellPadding": {
      "description": "Cell inner padding in pixels. Inherits from table cellPadding.",
      "type": "number"
    },
    "colSpan": {
      "description": "Number of columns this cell spans. Defaults to 1.",
      "type": "number"
    },
    "custom": {
      "description": "Custom data attached to the cell."
    },
    "fill": {
      "description": "Text color (CSS color string). Inherits from table fill.",
      "type": "string"
    },
    "fontFamily": {
      "description": "Font family name. Inherits from table fontFamily.",
      "type": "string"
    },
    "fontSize": {
      "description": "Font size in pixels. Inherits from table fontSize.",
      "type": "number"
    },
    "fontStyle": {
      "description": "Font style: 'normal' or 'italic'. Inherits from table fontStyle.",
      "type": "string"
    },
    "fontWeight": {
      "description": "Font weight: 'normal', 'bold', or numeric string. Inherits from table fontWeight.",
      "type": "string"
    },
    "id": {
      "description": "Unique identifier for the cell.",
      "type": "string"
    },
    "letterSpacing": {
      "description": "Letter spacing as percentage of font size. Inherits from table letterSpacing.",
      "type": "number"
    },
    "lineHeight": {
      "description": "Line height multiplier or string value. Inherits from table lineHeight.",
      "type": [
        "number",
        "string"
      ]
    },
    "mergedInto": {
      "description": "ID of the cell this cell is merged into. When set, this cell is hidden and its space is consumed by the target cell.",
      "type": "string"
    },
    "name": {
      "description": "Display name for the cell.",
      "type": "string"
    },
    "opacity": {
      "description": "Cell opacity (0-1). Defaults to 1.",
      "type": "number"
    },
    "rowSpan": {
      "description": "Number of rows this cell spans. Defaults to 1.",
      "type": "number"
    },
    "stroke": {
      "description": "Text stroke color. Inherits from table stroke.",
      "type": "string"
    },
    "strokeWidth": {
      "description": "Text stroke width in pixels. Inherits from table strokeWidth.",
      "type": "number"
    },
    "text": {
      "description": "Cell text content.",
      "type": "string"
    },
    "textDecoration": {
      "description": "Text decoration: 'underline', 'line-through', or empty string. Inherits from table textDecoration.",
      "type": "string"
    },
    "textTransform": {
      "description": "Text transform: 'uppercase', 'lowercase', 'capitalize', 'none'. Inherits from table textTransform.",
      "type": "string"
    },
    "type": {
      "const": "tablecell",
      "description": "Element type identifier.",
      "type": "string"
    },
    "verticalAlign": {
      "description": "Vertical text alignment. Inherits from table verticalAlign.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "type"
  ],
  "type": "object"
}

On this page