Skip to main content

Summary

Toggle conditional-format flags (header row, banded rows/columns, first/last column, last row) on a table. Pass styleOptions with the flags you want to set or clear (omitted flags stay unchanged). For “format the first row as a header” use styleOptions: \{ headerRow: true \}. Optional styleId applies a named table style. Leave it unset unless you have a styleId from superdoc_get_content (no need to invent one).
  • Operation ID: tables.applyStyle
  • API member path: editor.doc.tables.applyStyle(...)
  • Mutates document: yes
  • Idempotency: conditional
  • Supports tracked mode: no
  • Supports dry run: yes
  • Deterministic target resolution: yes

Expected result

Returns a TableMutationResult receipt; reports NO_OP if the style and all provided options already match.

Input fields

Variant 1 (target.kind=“block”)

Variant 2 (required: nodeId)

Example request

Output fields

Variant 1 (success=true)

Variant 2 (success=false)

When present, result.table is the follow-up address to reuse after this call. For non-destructive table-targeted mutations, pass result.table.nodeId to the next table operation instead of re-running find(). Destructive operations may omit table.

Example response

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • CAPABILITY_UNAVAILABLE

Non-applied failure codes

  • NO_OP
  • INVALID_TARGET
  • INVALID_INPUT

Raw schemas