Skip to main content

Summary

Set the paragraph mark’s run properties (w:pPr/w:rPr), e.g. the font size or specVanish carried by the paragraph-end mark. Available on v2-backed sessions only; v1-backed sessions currently return CAPABILITY_UNAVAILABLE.
  • Operation ID: format.paragraph.setMarkRunProps
  • API member path: editor.doc.format.paragraph.setMarkRunProps(...)
  • Mutates document: yes
  • Idempotency: conditional
  • Supports tracked mode: no
  • Supports dry run: yes
  • Deterministic target resolution: yes

Expected result

Returns a ParagraphMutationResult; reports NO_OP if the encoded mark run properties already match.

Input fields

FieldTypeRequiredDescription
markRunPropsobjectyes
markRunProps.baselineShiftnumberno
markRunProps.boldbooleanno
markRunProps.boldCsbooleanno
markRunProps.borderobjectno
markRunProps.border.colorobject(model=“rgb”) | object(model=“theme”) | object(model=“auto”)noOne of: object(model=“rgb”), object(model=“theme”), object(model=“auto”)
markRunProps.border.framebooleanno
markRunProps.border.shadowbooleanno
markRunProps.border.spacenumberno
markRunProps.border.stylestringno
markRunProps.border.widthnumberno
markRunProps.capsbooleanno
markRunProps.characterScalenumberno
markRunProps.characterSpacingnumberno
markRunProps.colorobject(model=“rgb”) | object(model=“theme”) | object(model=“auto”)noOne of: object(model=“rgb”), object(model=“theme”), object(model=“auto”)
markRunProps.csbooleanno
markRunProps.doubleStrikethroughbooleanno
markRunProps.embossbooleanno
markRunProps.fitTextWidthnumberno
markRunProps.fontFamilystringno
markRunProps.fontSizenumberno
markRunProps.fontSizeCsnumberno
markRunProps.fontsobjectno
markRunProps.fonts.asciistringno
markRunProps.fonts.asciiThemestringno
markRunProps.fonts.csstringno
markRunProps.fonts.csThemestringno
markRunProps.fonts.eastAsiastringno
markRunProps.fonts.eastAsiaThemestringno
markRunProps.fonts.hAnsistringno
markRunProps.fonts.hAnsiThemestringno
markRunProps.fonts.hintstringno
markRunProps.highlightstringno
markRunProps.imprintbooleanno
markRunProps.italicbooleanno
markRunProps.italicCsbooleanno
markRunProps.kernnumberno
markRunProps.langobjectno
markRunProps.lang.bidistringno
markRunProps.lang.eastAsiastringno
markRunProps.lang.valstringno
markRunProps.outlinebooleanno
markRunProps.rtlbooleanno
markRunProps.shadingobjectno
markRunProps.shading.colorobject(model=“rgb”) | object(model=“theme”) | object(model=“auto”)noOne of: object(model=“rgb”), object(model=“theme”), object(model=“auto”)
markRunProps.shading.fillobject(model=“rgb”) | object(model=“theme”) | object(model=“auto”)noOne of: object(model=“rgb”), object(model=“theme”), object(model=“auto”)
markRunProps.shading.patternstringno
markRunProps.shadowbooleanno
markRunProps.smallCapsbooleanno
markRunProps.specVanishbooleanno
markRunProps.strikethroughbooleanno
markRunProps.textEffectstringno
markRunProps.underlineobjectno
markRunProps.underline.colorobject(model=“rgb”) | object(model=“theme”) | object(model=“auto”)noOne of: object(model=“rgb”), object(model=“theme”), object(model=“auto”)
markRunProps.underline.stylestringno
markRunProps.vanishbooleanno
markRunProps.verticalAlignenumno"baseline", "superscript", "subscript"
markRunProps.webHiddenbooleanno
targetParagraphAddress | HeadingAddress | ListItemAddressyesOne of: ParagraphAddress, HeadingAddress, ListItemAddress

Example request

{
  "markRunProps": {
    "fontSizeCs": 12.5,
    "specVanish": true
  },
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "paragraph",
    "story": {
      "kind": "story",
      "storyType": "body"
    }
  }
}

Output fields

Variant 1 (success=true)

FieldTypeRequiredDescription
resolutionobjectyes
resolution.targetParagraphAddress | HeadingAddress | ListItemAddressyesOne of: ParagraphAddress, HeadingAddress, ListItemAddress
successtrueyesConstant: true
targetParagraphAddress | HeadingAddress | ListItemAddressyesOne of: ParagraphAddress, HeadingAddress, ListItemAddress

Variant 2 (success=false)

FieldTypeRequiredDescription
failureobjectyes
failure.codeenumyes"NO_OP", "CAPABILITY_UNAVAILABLE"
failure.detailsanyno
failure.messagestringyes
resolutionobjectno
resolution.targetParagraphAddress | HeadingAddress | ListItemAddressnoOne of: ParagraphAddress, HeadingAddress, ListItemAddress
successfalseyesConstant: false

Example response

{
  "resolution": {
    "target": {
      "kind": "block",
      "nodeId": "node-def456",
      "nodeType": "paragraph",
      "story": {
        "kind": "story",
        "storyType": "body"
      }
    }
  },
  "success": true,
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "paragraph",
    "story": {
      "kind": "story",
      "storyType": "body"
    }
  }
}

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • CAPABILITY_UNAVAILABLE

Non-applied failure codes

  • NO_OP
  • CAPABILITY_UNAVAILABLE

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "markRunProps": {
      "additionalProperties": false,
      "description": "Paragraph-mark run properties (SDRunProps shape, e.g. fontSizeCs, specVanish).",
      "minProperties": 1,
      "properties": {
        "baselineShift": {
          "type": "number"
        },
        "bold": {
          "type": "boolean"
        },
        "boldCs": {
          "type": "boolean"
        },
        "border": {
          "additionalProperties": false,
          "minProperties": 1,
          "properties": {
            "color": {
              "oneOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "rgb"
                    },
                    "value": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "model",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "theme"
                    },
                    "shade": {
                      "type": "integer"
                    },
                    "theme": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "tint": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "model",
                    "theme"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "auto"
                    }
                  },
                  "required": [
                    "model"
                  ],
                  "type": "object"
                }
              ]
            },
            "frame": {
              "type": "boolean"
            },
            "shadow": {
              "type": "boolean"
            },
            "space": {
              "type": "number"
            },
            "style": {
              "minLength": 1,
              "type": "string"
            },
            "width": {
              "type": "number"
            }
          },
          "type": "object"
        },
        "caps": {
          "type": "boolean"
        },
        "characterScale": {
          "type": "number"
        },
        "characterSpacing": {
          "type": "number"
        },
        "color": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "model": {
                  "const": "rgb"
                },
                "value": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "model",
                "value"
              ],
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "model": {
                  "const": "theme"
                },
                "shade": {
                  "type": "integer"
                },
                "theme": {
                  "minLength": 1,
                  "type": "string"
                },
                "tint": {
                  "type": "integer"
                }
              },
              "required": [
                "model",
                "theme"
              ],
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "model": {
                  "const": "auto"
                }
              },
              "required": [
                "model"
              ],
              "type": "object"
            }
          ]
        },
        "cs": {
          "type": "boolean"
        },
        "doubleStrikethrough": {
          "type": "boolean"
        },
        "emboss": {
          "type": "boolean"
        },
        "fitTextWidth": {
          "type": "number"
        },
        "fontFamily": {
          "minLength": 1,
          "type": "string"
        },
        "fonts": {
          "additionalProperties": false,
          "minProperties": 1,
          "properties": {
            "ascii": {
              "minLength": 1,
              "type": "string"
            },
            "asciiTheme": {
              "minLength": 1,
              "type": "string"
            },
            "cs": {
              "minLength": 1,
              "type": "string"
            },
            "csTheme": {
              "minLength": 1,
              "type": "string"
            },
            "eastAsia": {
              "minLength": 1,
              "type": "string"
            },
            "eastAsiaTheme": {
              "minLength": 1,
              "type": "string"
            },
            "hAnsi": {
              "minLength": 1,
              "type": "string"
            },
            "hAnsiTheme": {
              "minLength": 1,
              "type": "string"
            },
            "hint": {
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object"
        },
        "fontSize": {
          "type": "number"
        },
        "fontSizeCs": {
          "type": "number"
        },
        "highlight": {
          "minLength": 1,
          "type": "string"
        },
        "imprint": {
          "type": "boolean"
        },
        "italic": {
          "type": "boolean"
        },
        "italicCs": {
          "type": "boolean"
        },
        "kern": {
          "type": "number"
        },
        "lang": {
          "additionalProperties": false,
          "minProperties": 1,
          "properties": {
            "bidi": {
              "minLength": 1,
              "type": "string"
            },
            "eastAsia": {
              "minLength": 1,
              "type": "string"
            },
            "val": {
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object"
        },
        "outline": {
          "type": "boolean"
        },
        "rtl": {
          "type": "boolean"
        },
        "shading": {
          "additionalProperties": false,
          "minProperties": 1,
          "properties": {
            "color": {
              "oneOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "rgb"
                    },
                    "value": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "model",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "theme"
                    },
                    "shade": {
                      "type": "integer"
                    },
                    "theme": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "tint": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "model",
                    "theme"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "auto"
                    }
                  },
                  "required": [
                    "model"
                  ],
                  "type": "object"
                }
              ]
            },
            "fill": {
              "oneOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "rgb"
                    },
                    "value": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "model",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "theme"
                    },
                    "shade": {
                      "type": "integer"
                    },
                    "theme": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "tint": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "model",
                    "theme"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "auto"
                    }
                  },
                  "required": [
                    "model"
                  ],
                  "type": "object"
                }
              ]
            },
            "pattern": {
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object"
        },
        "shadow": {
          "type": "boolean"
        },
        "smallCaps": {
          "type": "boolean"
        },
        "specVanish": {
          "type": "boolean"
        },
        "strikethrough": {
          "type": "boolean"
        },
        "textEffect": {
          "minLength": 1,
          "type": "string"
        },
        "underline": {
          "additionalProperties": false,
          "minProperties": 1,
          "properties": {
            "color": {
              "oneOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "rgb"
                    },
                    "value": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "model",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "theme"
                    },
                    "shade": {
                      "type": "integer"
                    },
                    "theme": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "tint": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "model",
                    "theme"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "model": {
                      "const": "auto"
                    }
                  },
                  "required": [
                    "model"
                  ],
                  "type": "object"
                }
              ]
            },
            "style": {
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object"
        },
        "vanish": {
          "type": "boolean"
        },
        "verticalAlign": {
          "enum": [
            "baseline",
            "superscript",
            "subscript"
          ]
        },
        "webHidden": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "target": {
      "oneOf": [
        {
          "$ref": "#/$defs/ParagraphAddress"
        },
        {
          "$ref": "#/$defs/HeadingAddress"
        },
        {
          "$ref": "#/$defs/ListItemAddress"
        }
      ]
    }
  },
  "required": [
    "target",
    "markRunProps"
  ],
  "type": "object"
}
{
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "resolution": {
          "additionalProperties": false,
          "properties": {
            "target": {
              "oneOf": [
                {
                  "$ref": "#/$defs/ParagraphAddress"
                },
                {
                  "$ref": "#/$defs/HeadingAddress"
                },
                {
                  "$ref": "#/$defs/ListItemAddress"
                }
              ]
            }
          },
          "required": [
            "target"
          ],
          "type": "object"
        },
        "success": {
          "const": true
        },
        "target": {
          "oneOf": [
            {
              "$ref": "#/$defs/ParagraphAddress"
            },
            {
              "$ref": "#/$defs/HeadingAddress"
            },
            {
              "$ref": "#/$defs/ListItemAddress"
            }
          ]
        }
      },
      "required": [
        "success",
        "target",
        "resolution"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "failure": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "enum": [
                "NO_OP",
                "CAPABILITY_UNAVAILABLE"
              ]
            },
            "details": {},
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object"
        },
        "resolution": {
          "additionalProperties": false,
          "properties": {
            "target": {
              "oneOf": [
                {
                  "$ref": "#/$defs/ParagraphAddress"
                },
                {
                  "$ref": "#/$defs/HeadingAddress"
                },
                {
                  "$ref": "#/$defs/ListItemAddress"
                }
              ]
            }
          },
          "required": [
            "target"
          ],
          "type": "object"
        },
        "success": {
          "const": false
        }
      },
      "required": [
        "success",
        "failure"
      ],
      "type": "object"
    }
  ]
}
{
  "additionalProperties": false,
  "properties": {
    "resolution": {
      "additionalProperties": false,
      "properties": {
        "target": {
          "oneOf": [
            {
              "$ref": "#/$defs/ParagraphAddress"
            },
            {
              "$ref": "#/$defs/HeadingAddress"
            },
            {
              "$ref": "#/$defs/ListItemAddress"
            }
          ]
        }
      },
      "required": [
        "target"
      ],
      "type": "object"
    },
    "success": {
      "const": true
    },
    "target": {
      "oneOf": [
        {
          "$ref": "#/$defs/ParagraphAddress"
        },
        {
          "$ref": "#/$defs/HeadingAddress"
        },
        {
          "$ref": "#/$defs/ListItemAddress"
        }
      ]
    }
  },
  "required": [
    "success",
    "target",
    "resolution"
  ],
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "failure": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "enum": [
            "NO_OP",
            "CAPABILITY_UNAVAILABLE"
          ]
        },
        "details": {},
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "resolution": {
      "additionalProperties": false,
      "properties": {
        "target": {
          "oneOf": [
            {
              "$ref": "#/$defs/ParagraphAddress"
            },
            {
              "$ref": "#/$defs/HeadingAddress"
            },
            {
              "$ref": "#/$defs/ListItemAddress"
            }
          ]
        }
      },
      "required": [
        "target"
      ],
      "type": "object"
    },
    "success": {
      "const": false
    }
  },
  "required": [
    "success",
    "failure"
  ],
  "type": "object"
}