title
format.border
sidebarTitle
format.border
description
Set or clear the `border` inline run property on the target text range.
{/* GENERATED FILE: DO NOT EDIT. Regenerate via pnpm run docapi:sync. */}
Alpha: Document API is currently alpha and subject to breaking changes.
Set or clear the border inline run property on the target text range.
Operation ID: format.border
API member path: editor.doc.format.border(...)
Mutates document: yes
Idempotency: conditional
Supports tracked mode: no
Supports dry run: yes
Deterministic target resolution: yes
Returns a TextMutationReceipt confirming the inline run property patch was applied to the target range.
Variant 1 (target.kind="selection")
Field
Type
Required
Description
target
SelectionTarget
yes
SelectionTarget
target.end
SelectionPoint
yes
SelectionPoint
target.kind
"selection"
yes
Constant: "selection"
target.start
SelectionPoint
yes
SelectionPoint
value
object | null
yes
One of: object, null
Variant 2 (required: ref, value)
Field
Type
Required
Description
ref
string
yes
value
object | null
yes
One of: object, null
{
"target" : {
"end" : {
"blockId" : " block-abc123" ,
"kind" : " text" ,
"offset" : 0
},
"kind" : " selection" ,
"start" : {
"blockId" : " block-abc123" ,
"kind" : " text" ,
"offset" : 0
}
},
"value" : {
"sz" : 12.5 ,
"val" : " example"
}
}
Field
Type
Required
Description
inserted
EntityAddress[]
no
removed
EntityAddress[]
no
resolution
TextMutationResolution
yes
TextMutationResolution
resolution.range
TextMutationRange
yes
TextMutationRange
resolution.range.from
integer
yes
resolution.range.to
integer
yes
resolution.requestedTarget
TextAddress
no
TextAddress
resolution.requestedTarget.blockId
string
no
resolution.requestedTarget.kind
"text"
no
Constant: "text"
resolution.requestedTarget.range
Range
no
Range
resolution.requestedTarget.range.end
integer
no
resolution.requestedTarget.range.start
integer
no
resolution.selectionTarget
SelectionTarget
no
SelectionTarget
resolution.selectionTarget.end
SelectionPoint
no
SelectionPoint
resolution.selectionTarget.kind
"selection"
no
Constant: "selection"
resolution.selectionTarget.start
SelectionPoint
no
SelectionPoint
resolution.target
TextAddress
yes
TextAddress
resolution.target.blockId
string
yes
resolution.target.kind
"text"
yes
Constant: "text"
resolution.target.range
Range
yes
Range
resolution.target.range.end
integer
yes
resolution.target.range.start
integer
yes
resolution.text
string
yes
success
true
yes
Constant: true
updated
EntityAddress[]
no
Variant 2 (success=false)
Field
Type
Required
Description
failure
object
yes
failure.code
enum
yes
"INVALID_TARGET"
failure.details
any
no
failure.message
string
yes
resolution
TextMutationResolution
yes
TextMutationResolution
resolution.range
TextMutationRange
yes
TextMutationRange
resolution.range.from
integer
yes
resolution.range.to
integer
yes
resolution.requestedTarget
TextAddress
no
TextAddress
resolution.requestedTarget.blockId
string
no
resolution.requestedTarget.kind
"text"
no
Constant: "text"
resolution.requestedTarget.range
Range
no
Range
resolution.requestedTarget.range.end
integer
no
resolution.requestedTarget.range.start
integer
no
resolution.selectionTarget
SelectionTarget
no
SelectionTarget
resolution.selectionTarget.end
SelectionPoint
no
SelectionPoint
resolution.selectionTarget.kind
"selection"
no
Constant: "selection"
resolution.selectionTarget.start
SelectionPoint
no
SelectionPoint
resolution.target
TextAddress
yes
TextAddress
resolution.target.blockId
string
yes
resolution.target.kind
"text"
yes
Constant: "text"
resolution.target.range
Range
yes
Range
resolution.target.range.end
integer
yes
resolution.target.range.start
integer
yes
resolution.text
string
yes
success
false
yes
Constant: false
{
"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
}
},
"selectionTarget" : {
"end" : {
"blockId" : " block-abc123" ,
"kind" : " text" ,
"offset" : 0
},
"kind" : " selection" ,
"start" : {
"blockId" : " block-abc123" ,
"kind" : " text" ,
"offset" : 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"
}
]
}
TARGET_NOT_FOUND
CAPABILITY_UNAVAILABLE
INVALID_TARGET
INVALID_INPUT
STORY_NOT_FOUND
STORY_MISMATCH
STORY_NOT_SUPPORTED
CROSS_STORY_PLAN
MATERIALIZATION_FAILED
Non-applied failure codes
```json
{
"oneOf": [
{
"additionalProperties": false,
"properties": {
"target": {
"$ref": "#/$defs/SelectionTarget",
"description": "Selection target: {kind:'selection', start:{kind:'text', blockId, offset}, end:{kind:'text', blockId, offset}}. Use 'ref' instead when you have a search result handle."
},
"value": {
"oneOf": [
{
"additionalProperties": false,
"minProperties": 1,
"properties": {
"color": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"space": {
"oneOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"sz": {
"oneOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"val": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
{
"type": "null"
}
]
}
},
"required": [
"target",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"ref": {
"description": "Handle ref string from a superdoc_search result. Pass the handle.ref value directly (e.g. 'text:eyJ...'). Preferred over 'target' for inline formatting.",
"type": "string"
},
"value": {
"oneOf": [
{
"additionalProperties": false,
"minProperties": 1,
"properties": {
"color": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"space": {
"oneOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"sz": {
"oneOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"val": {
"oneOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
{
"type": "null"
}
]
}
},
"required": [
"ref",
"value"
],
"type": "object"
}
]
}
```
```json
{
"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"
}
]
}
```
```json
{
"$ref": "#/$defs/TextMutationSuccess"
}
```
```json
{
"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"
}
```