Alpha: Document API is currently alpha and subject to breaking changes.
Summary
- Operation ID:
format.rFonts - API member path:
editor.doc.format.rFonts(...) - Mutates document:
yes - Idempotency:
conditional - Supports tracked mode:
no - Supports dry run:
yes - Deterministic target resolution:
yes
Input fields
| Field | Type | Required | Description | |
|---|---|---|---|---|
target | TextAddress | yes | TextAddress | |
value | object \ | null | yes | One of: object, null |
Example request
Copy
Ask AI
{
"target": {
"blockId": "block-abc123",
"kind": "text",
"range": {
"end": 10,
"start": 0
}
},
"value": {
"ascii": "example",
"hAnsi": "example"
}
}
Output fields
No fields.Example response
Copy
Ask AI
{
"inserted": [
{
"entityId": "entity-789",
"entityType": "comment",
"kind": "entity"
}
],
"resolution": {
"range": {
"from": 0,
"to": 10
},
"requestedTarget": {
"blockId": "block-abc123",
"kind": "text",
"range": {
"end": 10,
"start": 0
}
},
"target": {
"blockId": "block-abc123",
"kind": "text",
"range": {
"end": 10,
"start": 0
}
},
"text": "Hello, world."
},
"success": true,
"updated": [
{
"entityId": "entity-789",
"entityType": "comment",
"kind": "entity"
}
]
}
Pre-apply throws
TARGET_NOT_FOUNDCAPABILITY_UNAVAILABLEINVALID_TARGETINVALID_INPUT
Non-applied failure codes
INVALID_TARGET
Raw schemas
Raw input schema
Raw input schema
Copy
Ask AI
{
"additionalProperties": false,
"properties": {
"target": {
"$ref": "#/$defs/TextAddress"
},
"value": {
"oneOf": [
{
"additionalProperties": false,
"minProperties": 1,
"properties": {
"ascii": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"asciiTheme": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"cs": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"csTheme": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"eastAsia": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"eastAsiaTheme": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"hAnsi": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"hAnsiTheme": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"hint": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
{
"type": "null"
}
]
}
},
"required": [
"target",
"value"
],
"type": "object"
}
Raw output schema
Raw output schema
Copy
Ask AI
{
"oneOf": [
{
"$ref": "#/$defs/TextMutationSuccess"
},
{
"additionalProperties": false,
"properties": {
"failure": {
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"INVALID_TARGET"
]
},
"details": {},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"resolution": {
"$ref": "#/$defs/TextMutationResolution"
},
"success": {
"const": false
}
},
"required": [
"success",
"failure",
"resolution"
],
"type": "object"
}
]
}
Raw success schema
Raw success schema
Copy
Ask AI
{
"$ref": "#/$defs/TextMutationSuccess"
}
Raw failure schema
Raw failure schema
Copy
Ask AI
{
"additionalProperties": false,
"properties": {
"failure": {
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"INVALID_TARGET"
]
},
"details": {},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"resolution": {
"$ref": "#/$defs/TextMutationResolution"
},
"success": {
"const": false
}
},
"required": [
"success",
"failure",
"resolution"
],
"type": "object"
}

