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

Summary

Validate a content control for Word compatibility issues.
  • Operation ID: contentControls.validateWordCompatibility
  • API member path: editor.doc.contentControls.validateWordCompatibility(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a compatibility result with diagnostics.

Input fields

FieldTypeRequiredDescription
targetobject(nodeType=“sdt”)yes
target.kindenumyes"block", "inline"
target.nodeIdstringyes
target.nodeType"sdt"yesConstant: "sdt"

Example request

{
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "sdt"
  }
}

Output fields

FieldTypeRequiredDescription
compatiblebooleanyes
diagnosticsobject[]yes

Example response

{
  "compatible": true,
  "diagnostics": [
    {}
  ]
}

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_INPUT
  • CAPABILITY_UNAVAILABLE

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "target": {
      "additionalProperties": false,
      "properties": {
        "kind": {
          "enum": [
            "block",
            "inline"
          ]
        },
        "nodeId": {
          "type": "string"
        },
        "nodeType": {
          "const": "sdt"
        }
      },
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ],
      "type": "object"
    }
  },
  "required": [
    "target"
  ],
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "compatible": {
      "type": "boolean"
    },
    "diagnostics": {
      "items": {
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "compatible",
    "diagnostics"
  ],
  "type": "object"
}