Skip to main content
Alpha: Document API is currently alpha and subject to breaking changes.

Summary

List all table styles and the document-level default table style setting.
  • Operation ID: tables.getStyles
  • API member path: editor.doc.tables.getStyles(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a TablesGetStylesOutput with the style catalog, explicit default, and effective default.

Input fields

No fields.

Example request

{}

Output fields

FieldTypeRequiredDescription
effectiveDefaultSourcestringyes
effectiveDefaultStyleIdanyyes
explicitDefaultStyleIdanyyes
stylesobject[]yes

Example response

{
  "effectiveDefaultSource": "example",
  "effectiveDefaultStyleId": {},
  "explicitDefaultStyleId": {},
  "styles": [
    {
      "basedOn": {},
      "conditionalRegions": [
        "example"
      ],
      "hidden": true,
      "id": "id-001",
      "isCustom": true,
      "isDefault": true,
      "name": {},
      "quickFormat": true,
      "uiPriority": {}
    }
  ]
}

Pre-apply throws

  • None

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {},
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "effectiveDefaultSource": {
      "type": "string"
    },
    "effectiveDefaultStyleId": {
      "type": [
        "string",
        "null"
      ]
    },
    "explicitDefaultStyleId": {
      "type": [
        "string",
        "null"
      ]
    },
    "styles": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "basedOn": {
            "type": [
              "string",
              "null"
            ]
          },
          "conditionalRegions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "hidden": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "isCustom": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "quickFormat": {
            "type": "boolean"
          },
          "uiPriority": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "basedOn",
          "isDefault",
          "isCustom",
          "uiPriority",
          "hidden",
          "quickFormat",
          "conditionalRegions"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "explicitDefaultStyleId",
    "effectiveDefaultStyleId",
    "effectiveDefaultSource",
    "styles"
  ],
  "type": "object"
}