formatRange
Legacy root-level alias for inline range formatting. Routes to `format.apply` for compatibility with older callers.
doc.formatRange(…)Expected result
Returns a TextMutationReceipt confirming inline styles were applied to the target range.
Inputs
target
targetSelectionTargetrequiredSelection target: {kind:'selection', start:{kind:'text', blockId, offset}, end:{kind:'text', blockId, offset}}. Use 'ref' instead when you have a search result handle.
Fields
captureStatestringOpaque browser selection capture state. Preserve it when passing a selection target to comments.create. Changed or unverifiable state is refused before writing.
kind"selection"requiredstartSelectionPointrequiredA point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.
text
kind"text"requiredblockIdstringrequiredoffsetintegerrequiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequirednodeEdge
kind"nodeEdge"requirednodeSelectionEdgeNodeAddressrequirededge"before" | "after"requiredendSelectionPointrequiredA point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.
text
kind"text"requiredblockIdstringrequiredoffsetintegerrequiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequirednodeEdge
kind"nodeEdge"requirednodeSelectionEdgeNodeAddressrequirededge"before" | "after"requiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredcoordinateSpaceTextCoordinateSpaceinStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredFields
kind"section"requiredsectionIdstringrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredpropertiesobjectrequiredInline formatting properties to apply. Set a property to apply it, use null to clear it. Example: {bold: true, italic: true} or {bold: null} to remove bold.
Fields
boldboolean | nullVariant 1
No fields.
Variant 2
No fields.
italicboolean | nullVariant 1
No fields.
Variant 2
No fields.
strikeboolean | nullVariant 1
No fields.
Variant 2
No fields.
underlineboolean | null | objectVariant 1
No fields.
Variant 2
No fields.
Variant 3
stylestring | nullVariant 1
No fields.
Variant 2
No fields.
colorstring | nullVariant 1
No fields.
Variant 2
No fields.
themeColorstring | nullVariant 1
No fields.
Variant 2
No fields.
highlightstring | nullVariant 1
No fields.
Variant 2
No fields.
colorstring | nullVariant 1
No fields.
Variant 2
No fields.
fontSizenumber | nullVariant 1
No fields.
Variant 2
No fields.
fontFamilystring | nullVariant 1
No fields.
Variant 2
No fields.
letterSpacingnumber | nullVariant 1
No fields.
Variant 2
No fields.
vertAlign"superscript" | "subscript" | "baseline" | nullVariant 1
No fields.
Variant 2
No fields.
positionnumber | nullVariant 1
No fields.
Variant 2
No fields.
dstrikeboolean | nullVariant 1
No fields.
Variant 2
No fields.
smallCapsboolean | nullVariant 1
No fields.
Variant 2
No fields.
capsboolean | nullVariant 1
No fields.
Variant 2
No fields.
shadingobject | nullVariant 1
fillstring | nullVariant 1
No fields.
Variant 2
No fields.
colorstring | nullVariant 1
No fields.
Variant 2
No fields.
valstring | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
borderobject | nullVariant 1
valstring | nullVariant 1
No fields.
Variant 2
No fields.
sznumber | nullVariant 1
No fields.
Variant 2
No fields.
colorstring | nullVariant 1
No fields.
Variant 2
No fields.
spacenumber | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
outlineboolean | nullVariant 1
No fields.
Variant 2
No fields.
shadowboolean | nullVariant 1
No fields.
Variant 2
No fields.
embossboolean | nullVariant 1
No fields.
Variant 2
No fields.
imprintboolean | nullVariant 1
No fields.
Variant 2
No fields.
charScalenumber | nullVariant 1
No fields.
Variant 2
No fields.
kerningnumber | nullVariant 1
No fields.
Variant 2
No fields.
vanishboolean | nullVariant 1
No fields.
Variant 2
No fields.
webHiddenboolean | nullVariant 1
No fields.
Variant 2
No fields.
specVanishboolean | nullVariant 1
No fields.
Variant 2
No fields.
rtlboolean | nullVariant 1
No fields.
Variant 2
No fields.
csboolean | nullVariant 1
No fields.
Variant 2
No fields.
bCsboolean | nullVariant 1
No fields.
Variant 2
No fields.
iCsboolean | nullVariant 1
No fields.
Variant 2
No fields.
eastAsianLayoutobject | nullVariant 1
idstring | nullVariant 1
No fields.
Variant 2
No fields.
combineboolean | nullVariant 1
No fields.
Variant 2
No fields.
combineBracketsstring | nullVariant 1
No fields.
Variant 2
No fields.
vertboolean | nullVariant 1
No fields.
Variant 2
No fields.
vertCompressboolean | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
emstring | nullVariant 1
No fields.
Variant 2
No fields.
fitTextobject | nullVariant 1
valnumber | nullVariant 1
No fields.
Variant 2
No fields.
idstring | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
snapToGridboolean | nullVariant 1
No fields.
Variant 2
No fields.
langobject | nullVariant 1
valstring | nullVariant 1
No fields.
Variant 2
No fields.
eastAsiastring | nullVariant 1
No fields.
Variant 2
No fields.
bidistring | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
oMathboolean | nullVariant 1
No fields.
Variant 2
No fields.
rStylestring | nullVariant 1
No fields.
Variant 2
No fields.
rFontsobject | nullVariant 1
asciistring | nullVariant 1
No fields.
Variant 2
No fields.
hAnsistring | nullVariant 1
No fields.
Variant 2
No fields.
eastAsiastring | nullVariant 1
No fields.
Variant 2
No fields.
csstring | nullVariant 1
No fields.
Variant 2
No fields.
asciiThemestring | nullVariant 1
No fields.
Variant 2
No fields.
hAnsiThemestring | nullVariant 1
No fields.
Variant 2
No fields.
eastAsiaThemestring | nullVariant 1
No fields.
Variant 2
No fields.
csThemestring | nullVariant 1
No fields.
Variant 2
No fields.
hintstring | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
fontSizeCsnumber | nullVariant 1
No fields.
Variant 2
No fields.
ligaturesstring | nullVariant 1
No fields.
Variant 2
No fields.
numFormstring | nullVariant 1
No fields.
Variant 2
No fields.
numSpacingstring | nullVariant 1
No fields.
Variant 2
No fields.
stylisticSetsobject[] | nullVariant 1
No fields.
Variant 2
No fields.
contextualAlternatesboolean | nullVariant 1
No fields.
Variant 2
No fields.
changeMode"direct" | "tracked"Edit mode: 'direct' applies changes immediately, 'tracked' records tracked formatting.
dryRunbooleanPreview the result without mutating the document.
expectedRevisionstringDocument revision for optimistic concurrency. Mutation fails if document was modified since this revision.
ref
refstringrequiredHandle ref string from a superdoc_search result. Pass the handle.ref value directly (e.g. 'text:eyJ...'). Preferred over 'target' for inline formatting.
inStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredFields
kind"section"requiredsectionIdstringrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredpropertiesobjectrequiredInline formatting properties to apply. Set a property to apply it, use null to clear it. Example: {bold: true, italic: true} or {bold: null} to remove bold.
Fields
boldboolean | nullVariant 1
No fields.
Variant 2
No fields.
italicboolean | nullVariant 1
No fields.
Variant 2
No fields.
strikeboolean | nullVariant 1
No fields.
Variant 2
No fields.
underlineboolean | null | objectVariant 1
No fields.
Variant 2
No fields.
Variant 3
stylestring | nullVariant 1
No fields.
Variant 2
No fields.
colorstring | nullVariant 1
No fields.
Variant 2
No fields.
themeColorstring | nullVariant 1
No fields.
Variant 2
No fields.
highlightstring | nullVariant 1
No fields.
Variant 2
No fields.
colorstring | nullVariant 1
No fields.
Variant 2
No fields.
fontSizenumber | nullVariant 1
No fields.
Variant 2
No fields.
fontFamilystring | nullVariant 1
No fields.
Variant 2
No fields.
letterSpacingnumber | nullVariant 1
No fields.
Variant 2
No fields.
vertAlign"superscript" | "subscript" | "baseline" | nullVariant 1
No fields.
Variant 2
No fields.
positionnumber | nullVariant 1
No fields.
Variant 2
No fields.
dstrikeboolean | nullVariant 1
No fields.
Variant 2
No fields.
smallCapsboolean | nullVariant 1
No fields.
Variant 2
No fields.
capsboolean | nullVariant 1
No fields.
Variant 2
No fields.
shadingobject | nullVariant 1
fillstring | nullVariant 1
No fields.
Variant 2
No fields.
colorstring | nullVariant 1
No fields.
Variant 2
No fields.
valstring | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
borderobject | nullVariant 1
valstring | nullVariant 1
No fields.
Variant 2
No fields.
sznumber | nullVariant 1
No fields.
Variant 2
No fields.
colorstring | nullVariant 1
No fields.
Variant 2
No fields.
spacenumber | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
outlineboolean | nullVariant 1
No fields.
Variant 2
No fields.
shadowboolean | nullVariant 1
No fields.
Variant 2
No fields.
embossboolean | nullVariant 1
No fields.
Variant 2
No fields.
imprintboolean | nullVariant 1
No fields.
Variant 2
No fields.
charScalenumber | nullVariant 1
No fields.
Variant 2
No fields.
kerningnumber | nullVariant 1
No fields.
Variant 2
No fields.
vanishboolean | nullVariant 1
No fields.
Variant 2
No fields.
webHiddenboolean | nullVariant 1
No fields.
Variant 2
No fields.
specVanishboolean | nullVariant 1
No fields.
Variant 2
No fields.
rtlboolean | nullVariant 1
No fields.
Variant 2
No fields.
csboolean | nullVariant 1
No fields.
Variant 2
No fields.
bCsboolean | nullVariant 1
No fields.
Variant 2
No fields.
iCsboolean | nullVariant 1
No fields.
Variant 2
No fields.
eastAsianLayoutobject | nullVariant 1
idstring | nullVariant 1
No fields.
Variant 2
No fields.
combineboolean | nullVariant 1
No fields.
Variant 2
No fields.
combineBracketsstring | nullVariant 1
No fields.
Variant 2
No fields.
vertboolean | nullVariant 1
No fields.
Variant 2
No fields.
vertCompressboolean | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
emstring | nullVariant 1
No fields.
Variant 2
No fields.
fitTextobject | nullVariant 1
valnumber | nullVariant 1
No fields.
Variant 2
No fields.
idstring | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
snapToGridboolean | nullVariant 1
No fields.
Variant 2
No fields.
langobject | nullVariant 1
valstring | nullVariant 1
No fields.
Variant 2
No fields.
eastAsiastring | nullVariant 1
No fields.
Variant 2
No fields.
bidistring | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
oMathboolean | nullVariant 1
No fields.
Variant 2
No fields.
rStylestring | nullVariant 1
No fields.
Variant 2
No fields.
rFontsobject | nullVariant 1
asciistring | nullVariant 1
No fields.
Variant 2
No fields.
hAnsistring | nullVariant 1
No fields.
Variant 2
No fields.
eastAsiastring | nullVariant 1
No fields.
Variant 2
No fields.
csstring | nullVariant 1
No fields.
Variant 2
No fields.
asciiThemestring | nullVariant 1
No fields.
Variant 2
No fields.
hAnsiThemestring | nullVariant 1
No fields.
Variant 2
No fields.
eastAsiaThemestring | nullVariant 1
No fields.
Variant 2
No fields.
csThemestring | nullVariant 1
No fields.
Variant 2
No fields.
hintstring | nullVariant 1
No fields.
Variant 2
No fields.
Variant 2
No fields.
fontSizeCsnumber | nullVariant 1
No fields.
Variant 2
No fields.
ligaturesstring | nullVariant 1
No fields.
Variant 2
No fields.
numFormstring | nullVariant 1
No fields.
Variant 2
No fields.
numSpacingstring | nullVariant 1
No fields.
Variant 2
No fields.
stylisticSetsobject[] | nullVariant 1
No fields.
Variant 2
No fields.
contextualAlternatesboolean | nullVariant 1
No fields.
Variant 2
No fields.
changeMode"direct" | "tracked"Edit mode: 'direct' applies changes immediately, 'tracked' records tracked formatting.
dryRunbooleanPreview the result without mutating the document.
expectedRevisionstringDocument revision for optimistic concurrency. Mutation fails if document was modified since this revision.
Result
Output fields
true
successtruerequiredappliedChangeMode"direct" | "tracked"resolutionTextMutationResolutionrequiredFields
requestedTargetTextAddressFields
captureStatestringOpaque browser selection capture state. Preserve it when passing a selection target to comments.create. Changed or unverifiable state is refused before writing.
kind"text"requiredblockIdstringrequiredrangeRangerequiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredtargetTextAddressrequiredFields
captureStatestringOpaque browser selection capture state. Preserve it when passing a selection target to comments.create. Changed or unverifiable state is refused before writing.
kind"text"requiredblockIdstringrequiredrangeRangerequiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredrangeTextMutationRangerequiredFields
fromintegerrequiredtointegerrequiredtextstringrequiredselectionTargetSelectionTargetFields
captureStatestringOpaque browser selection capture state. Preserve it when passing a selection target to comments.create. Changed or unverifiable state is refused before writing.
kind"selection"requiredstartSelectionPointrequiredA point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.
text
kind"text"requiredblockIdstringrequiredoffsetintegerrequiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequirednodeEdge
kind"nodeEdge"requirednodeSelectionEdgeNodeAddressrequirededge"before" | "after"requiredendSelectionPointrequiredA point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.
text
kind"text"requiredblockIdstringrequiredoffsetintegerrequiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequirednodeEdge
kind"nodeEdge"requirednodeSelectionEdgeNodeAddressrequirededge"before" | "after"requiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredcoordinateSpaceTextCoordinateSpacestatus"NO_OP"changeTagstringCaller correlation for this commit only; never persisted or replayed on Undo/Redo.
temporaryobjectFields
idstringrequiredphase"begin" | "replace" | "rollback" | "commit"requiredtagstringrequiredonNativeEdit"cancel" | "preserve"cancelledBy"native-edit"idstringinsertedEntityAddress[]updatedEntityAddress[]removedEntityAddress[]invalidatedRefsAffectedRef[]remappedRefsAffectedRefRemapping[]affectedStoriesStoryLocator[]textRangeShiftsTextRangeShift[]trackedTextRangeShiftsTrackedTextRangeShift[]txIdstringwarningsReviewWarning[]effectsReceiptEffectsFields
insertedTextTextMutationEffect[]insertedBlocksBlockMutationEffect[]resultTextTextTargetFields
captureStatestringOpaque browser selection capture state. Preserve it when passing a selection target to comments.create. Changed or unverifiable state is refused before writing.
kind"text"requiredsegmentsTextSegment[]requiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredcoordinateSpaceTextCoordinateSpacetrackedChangeRefsTrackedChangeAddress[]trackedChangeCountintegerchangedbooleanhistoryHistoryReplayFields
txIdstringrequireddirection"undo" | "redo"requiredtxIdsstring[]trackedChangeOutcomesobject[]false
successfalserequiredfailureobjectrequiredFields
code"INVALID_TARGET" | "NO_OP"requiredmessagestringrequireddetailsunknownresolutionTextMutationResolutionrequiredFields
requestedTargetTextAddressFields
captureStatestringOpaque browser selection capture state. Preserve it when passing a selection target to comments.create. Changed or unverifiable state is refused before writing.
kind"text"requiredblockIdstringrequiredrangeRangerequiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredtargetTextAddressrequiredFields
captureStatestringOpaque browser selection capture state. Preserve it when passing a selection target to comments.create. Changed or unverifiable state is refused before writing.
kind"text"requiredblockIdstringrequiredrangeRangerequiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredrangeTextMutationRangerequiredFields
fromintegerrequiredtointegerrequiredtextstringrequiredselectionTargetSelectionTargetFields
captureStatestringOpaque browser selection capture state. Preserve it when passing a selection target to comments.create. Changed or unverifiable state is refused before writing.
kind"selection"requiredstartSelectionPointrequiredA point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.
text
kind"text"requiredblockIdstringrequiredoffsetintegerrequiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequirednodeEdge
kind"nodeEdge"requirednodeSelectionEdgeNodeAddressrequirededge"before" | "after"requiredendSelectionPointrequiredA point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.
text
kind"text"requiredblockIdstringrequiredoffsetintegerrequiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequirednodeEdge
kind"nodeEdge"requirednodeSelectionEdgeNodeAddressrequirededge"before" | "after"requiredstoryStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredcoordinateSpaceTextCoordinateSpaceFailures
Pre-apply throws
TARGET_NOT_FOUNDCAPABILITY_UNAVAILABLEINVALID_TARGET
6 more codes
INVALID_INPUTSTORY_NOT_FOUNDSTORY_MISMATCHSTORY_NOT_SUPPORTEDCROSS_STORY_PLANMATERIALIZATION_FAILED
Non-applied receipt codes
INVALID_TARGETNO_OP
Raw schemas
Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.
View raw JSON schemas