Skip to Content

@stesura/core/schema

The document schema. stesuraSchema() builds it; the node and mark specs, node names and the global-attribute system are exported for custom schemas.

The *_NODES lists are default bindings only: stesuraSchema’s globalAttributes.nodes can change them per schema. Gate runtime behaviour on the is*Type / get*NodeNames predicates, which read the constructed schema.

Functions & values

BLOCK_CONTENT_CLASS

Classes a textblock emits from its OWN content, so stylesheets can select on content shape without :has(), whose invalidation checks on every DOM insertion dominated mount time (~1100 forced recalcs on a 600-block document; docs/executed/editor-load-perf-plan.md). toDOM is memoized on node identity, so this costs one pass per CHANGED block.

NameTypeDefault
blank"pm-blank"

No inline children at all — the block renders as a bare trailing break.

trailingBreak"pm-trailing-break"

ProseMirror renders a br.ProseMirror-trailingBreak inside this block.

atomEnd"pm-atom-end"

Ends in a non-text inline node other than a hard break. The trailing <br> renders after it, so an ::after pilcrow would land on the next line (MT-12); these blocks get a widget marker instead (see plugins/invisible-characters/pilcrow-decorations.ts).

anchorFloat"pm-anchor-float"

Contains a floated positioned object (floating family), so the block must contain its float.

hasDeletion"pm-tc-del"

At least one child carries the track-changes deletion mark.

allDeleted"pm-tc-all-del"

Every child carries the deletion mark — nothing renders in show-off mode.

blockContentClasses

The space-separated BLOCK_CONTENT_CLASS list for a textblock, or "" when none apply. Emitted by the blockContentClasses global attribute, not by node specs.

Parameters:
NameTypeDefault
nodeNode
Returns:
string

buildCoreGlobalAttributes

The core global attribute definitions with their DEFAULT node bindings. nodeSpecs feeds the shape-derived bindings (uniqueId, blockContentClasses); resolveGlobalAttributes applies consumer config on top.

Parameters:
NameTypeDefault
nodeSpecsRecord<string, NodeSpec>
Returns:
{ trackChanges: { nodes: string[]; attrs: { trackChanges: { default: null; }; }; toDOM: (node: Node) => {}; getAttrs: (dom: HTMLElement) => { trackChanges: null; } | { trackChanges: { ...; }; }; }; ... 19 more ...; redactionRegions: { ...; }; }

ENDNOTE_NODE_NAMES

Node names and ref attr of the endnote family.

NameTypeDefault
anchor"endnote_anchor"
body"endnote_body"
container"endnotes"
refAttrstring

FOOTNOTE_NODE_NAMES

Node names and ref attr of the footnote family.

NameTypeDefault
anchor"footnote_anchor"
body"footnote_body"
container"footnotes"
refAttrstring

getBlockTrackChangeNodeNames

Names of the schema’s node types carrying block track-changes attributes.

Parameters:
NameTypeDefault
schemaSchema<any, any>
Returns:
ReadonlySet<string>

getCodeBlockSpec

Resolves the code_block node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getColumnBreakSpec

Resolves the column_break node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getCommentsSpecs

Resolves the comment marker node types, or false when the schema omits any of them.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | { commentOpenSpec: NodeType; commentCloseSpec: NodeType; }

getCounterNodeSpec

Resolves the counter_node node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getCrossReferenceSpec

Resolves the cross_reference node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getEndnotesSpecs

Resolves the endnote node types, or false when the schema omits any of them.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | { endnoteBodySpec: NodeType; endnoteAnchorSpec: NodeType; endnotesSpec: NodeType; }

getFileSpec

Resolves the file node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getFloatingNodeNames

Names of the schema’s node types carrying the floating family.

Parameters:
NameTypeDefault
schemaSchema<any, any>
Returns:
ReadonlySet<string>

getFootnotesSpecs

Resolves the footnote node types, or false when the schema omits any of them.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | { footnoteBodySpec: NodeType; footnoteAnchorSpec: NodeType; footnotesSpec: NodeType; }

getFormattedNodeNames

Names of the schema’s node types carrying the formatting family.

Parameters:
NameTypeDefault
schemaSchema<any, any>
Returns:
ReadonlySet<string>

getGlobalDOMAttributesMap

The DOM-attributes map for a schema, including custom definitions when it was built by stesuraSchema. Prefer this over buildGlobalDOMAttributesMap, which needs the original config. Other schemas get a map rebuilt from their node specs, which covers core attributes only.

Parameters:
NameTypeDefault
schemaSchema<any, any>
Returns:
GlobalDOMAttributesMap

getHighlightMarkSpec

The highlight mark type, or false (with a console warning) when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaEditorState | Schema<any, any>
Returns:
false | MarkType

getHorizontalRuleSpec

Resolves the horizontal_rule node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getImageAnchoredSpec

Resolves the inline image_anchored node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getImageSpec

Resolves the block image node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getMathDisplaySpec

Resolves the math_display node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getMathInlineSpec

Resolves the math_inline node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getNumberedNodeNames

Names of the schema’s node types carrying numbering.

Parameters:
NameTypeDefault
schemaSchema<any, any>
Returns:
ReadonlySet<string>

getPageBreakSpec

Resolves the page_break node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getPageNumberSpec

Resolves the page_number node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getPaginatedNodeNames

Names of the schema’s node types carrying pagination.

Parameters:
NameTypeDefault
schemaSchema<any, any>
Returns:
ReadonlySet<string>

getProofreadIgnoreMarkSpec

The proofReadIgnore mark type, or false (with a console warning) when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaEditorState | Schema<any, any>
Returns:
false | MarkType

getProofreadNodeNames

Names of the schema’s node types carrying proofingLanguage.

Parameters:
NameTypeDefault
schemaSchema<any, any>
Returns:
ReadonlySet<string>

getSectionSpecs

Resolves the section node types (section, content, header, footer, header/footer content), or false when the input is nullish or the schema omits any of them.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | { sectionContentSpec: NodeType; sectionSpec: NodeType; sectionHeaderSpec: NodeType; sectionFooterSpec: NodeType; headerFooterContentSpec: NodeType; }

getSpacedNodeNames

Names of the schema’s node types carrying spacing.

Parameters:
NameTypeDefault
schemaSchema<any, any>
Returns:
ReadonlySet<string>

getStyledBlockNodeNames

Names of the schema’s node types carrying block styling.

Parameters:
NameTypeDefault
schemaSchema<any, any>
Returns:
ReadonlySet<string>

getTableSpecs

Resolves the table, row and cell node types, or false when the schema omits any of them.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | { tableCellSpec: NodeType; tableRowSpec: NodeType; tableSpec: NodeType; }

getTextStyleMarkSpec

The textStyle mark type, or false (with a console warning) when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaEditorState | Schema<any, any>
Returns:
false | MarkType

getTocSpec

Resolves the toc node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

getUploadBlockSpec

Resolves the upload placeholder node type, or false when the schema omits it.

Parameters:
NameTypeDefault
stateOrSchemaStateOrSchema
Returns:
false | NodeType

GLOBAL_ATTRIBUTE_MARKER

export const GLOBAL_ATTRIBUTE_MARKER = Symbol.for("stesura.globalAttribute");

Tags an attr object as injected by the global-attribute pass, so assertNoReservedAttrs accepts an already-processed spec fed back into stesuraSchema (e.g. { ...schema.nodes.toc.spec, spacingRole: "passThrough" }).

isBlockTrackChangesType

Carries block-level track-changes attributes — trackChanges and trackChangesModification (default list: BLOCK_TRACK_CHANGES_NODES). Keys on trackChanges.

Parameters:
NameTypeDefault
typeNodeType
Returns:
boolean

isFloatingType

Carries the floating placement family: wrap / anchorPosition / wrapDistance / zIndex (default list: FLOATING_NODES). Keys on anchorPosition; wrap is too common a name to reserve (the block image declares its own).

Parameters:
NameTypeDefault
typeNodeType
Returns:
boolean

isFormattedType

Carries the formatting family: formatting / textAlign / direction / suppressLineNumbers (default list: FORMATTED_NODES). Keys on indent, the attr injected by the formatting anchor attribute.

Parameters:
NameTypeDefault
typeNodeType
Returns:
boolean

isNumberedType

Carries the numbering attribute (default list: NUMBERED_NODES).

A custom node granted numbering also needs a content expression accepting a counter_node first child (as paragraph/heading declare), or the numbering plugin cannot materialize its counter.

Parameters:
NameTypeDefault
typeNodeType
Returns:
boolean

isPaginatedType

Carries the pagination attribute (default list: PAGINATED_NODES).

Parameters:
NameTypeDefault
typeNodeType
Returns:
boolean

isProofreadType

Carries the proofingLanguage attribute (default list: PROOFREAD_NODES).

Parameters:
NameTypeDefault
typeNodeType
Returns:
boolean

isSpacedType

Carries the spacing attribute (default list: SPACED_NODES).

Parameters:
NameTypeDefault
typeNodeType
Returns:
boolean

isStyledBlockType

Carries block styling: styleId and blockStyling (bgColor / borders) (default list: STYLED_BLOCK_NODES). Keys on styleId; the doc’s stylesheet definitions live under a different name (styleSheet), so no topNode carve-out is needed.

Parameters:
NameTypeDefault
typeNodeType
Returns:
boolean

marks

NameTypeDefault
redactionMarkSpec
borderMarkSpec
strongMarkSpec
emMarkSpec
underlineMarkSpec
strikethroughMarkSpec
superscriptMarkSpec
subscriptMarkSpec
deletionMarkSpec
insertionMarkSpec
modificationMarkSpec
highlightMarkSpec
proofReadIgnoreMarkSpec
textStyleMarkSpec
codeMarkSpec

mathStyleFromMarks

What the stored marks actually render as — MATH_TEXT_STYLE_ATTRS and highlight.

Parameters:
NameTypeDefault
storedreadonly MathMarkJSON[]
Returns:
MathStyle

NODE_NAMES

Node type names as constants. Prefer these over string literals.

NameTypeDefault
Doc"doc"
Paragraph"paragraph"
Heading"heading"
Counter"counter_node"
TOC"toc"
HorizontalRule"horizontal_rule"
PageBreak"page_break"
ColumnBreak"column_break"
Image"image"
ImageAnchored"image_anchored"
Drawing"drawing"

DrawingML passed through untouched (a group, chart, SmartArt…).

FloatingBox"floating_box"
MathInline"math_inline"
MathDisplay"math_display"
Table"table"
TableRow"table_row"
TableCell"table_cell"
CodeBlock"code_block"
HardBreak"hard_break"
BoundaryOpenNode"boundary_open_node"
BoundaryCloseNode"boundary_close_node"
PageNumber"page_number"
CommentOpen"comment_open"
CommentClose"comment_close"
UploadBlock"upload_block"
File"file"
Callout"callout"
Field"field"
Placeholder"placeholder"

A fill-in prompt (Word’s content-control placeholder text).

ContentSlot"content_slot"
SectionHeaderFooterContent"header_footer_content"
Section"section"
SectionHeader"section_header"
SectionFooter"section_footer"
SectionContent"section_content"
Footnotes"footnotes"
FootnoteAnchor"footnote_anchor"
FootnoteBody"footnote_body"
Endnotes"endnotes"
EndnoteAnchor"endnote_anchor"
EndnoteBody"endnote_body"
CrossReference"cross_reference"
FieldCode"field_code"

A Word field with no node of its own; field is the template variable.

SeqField"seq_field"

Word’s SEQ field: a caption’s number (field is taken by automation).

Citation"citation"
Bibliography"bibliography"

nodes

The core node specs, before the global-attribute pass.

NameTypeDefault
fileNodeSpec
fieldNodeSpec
placeholderNodeSpec
docNodeSpec
paragraphNodeSpec
headingNodeSpec
counter_nodeNodeSpec
tocNodeSpec
horizontal_ruleNodeSpec
page_breakNodeSpec
column_breakNodeSpec
imageNodeSpec
image_anchoredNodeSpec
drawingNodeSpec
floating_boxNodeSpec
math_inlineNodeSpec
math_displayNodeSpec
tableNodeSpec
table_rowNodeSpec
table_cellNodeSpec
code_blockNodeSpec
hard_breakNodeSpec
boundary_open_nodeNodeSpec
boundary_close_nodeNodeSpec
page_numberNodeSpec
comment_openNodeSpec
comment_closeNodeSpec
upload_blockNodeSpec
calloutNodeSpec
content_slotNodeSpec
sectionNodeSpec
section_headerNodeSpec
section_contentNodeSpec
footnotesNodeSpec
footnote_anchorNodeSpec
footnote_bodyNodeSpec
endnotesNodeSpec
endnote_anchorNodeSpec
endnote_bodyNodeSpec
cross_referenceNodeSpec
field_codeNodeSpec
seq_fieldNodeSpec
citationNodeSpec
bibliographyNodeSpec
textNodeSpec

resolveGlobalAttributes

Core + custom global attributes, with node bindings = defaults adjusted by the consumer’s delta. Invalid config only logs; a reserved gate attr on a node spec or custom definition throws a RangeError.

Parameters:
NameTypeDefault
nodeSpecsRecord<string, NodeSpec>
configGlobalAttributesConfig<Record<string, GlobalAttributeDefinition>>
options{ assertReservedNames?: boolean; excludedNodes?: ReadonlySet<string>; }
Returns:
GlobalAttributeMap

stesuraSchema

Builds the Stesura schema: core nodes/marks merged with the given overrides, minus excludeNodes, then run through the global-attribute pipeline.

Parameters:
NameTypeDefault
propsStesuraSchemaProps<D>
Returns:
Schema<any, any>

withGlobalAttributes

Resolves the global attributes and applies them to every node spec.

Parameters:
NameTypeDefault
nodesT
configGlobalAttributesConfig
Returns:
T

Types

GlobalAttributesConfig

The globalAttributes option of stesuraSchema:

  • definitions registers custom global attributes. Keys colliding with a core attribute are discarded with an error.
  • nodes binds attributes to node types as a DELTA on the defaults, keyed by core or custom attribute name, so configs stay valid when core defaults evolve.

uniqueId is not configurable (pagination requires an id on every block node); a delta for it is ignored with an error.

NameTypeDefault
definitionsD
nodesPartial<Record<GlobalAttributeKey | (keyof D & string), GlobalAttributeNodesDelta>>

GlobalDOMAttributesMap

export type GlobalDOMAttributesMap = Map<string, (node: Node) => Record<string, string>>;

MathMarkJSON

An equation’s whole-node styling, stored as mark JSON in its mathMarks attr rather than as real marks.

ProseMirror disallows marks inside non-inline content by default, so block containers refuse marks on math_display: Node.check() throws and a DOM round trip drops the node. Inline math could take real marks, but one shape for both is simpler, and the command, toolbar and DOCX layers still speak Mark, converting only at this boundary.

NameTypeDefault
typestring
attrsAttrs

MathStyle

The CSS an equation’s stored marks resolve to.

NameTypeDefault
colorstring
fontSizenumber

Points, matching the textStyle attr.

bgColorstring

NoteKindNodeNames

Node names + ref attribute of one note kind (footnote/endnote), for kind-generic note code.

NameTypeDefault
anchorNodeNameValue
bodyNodeNameValue
containerNodeNameValue
refAttrstring

Anchor/body attribute holding the note ref (not “id” — the uniqueId plugin owns that).

StesuraSchemaProps

What stesuraSchema takes.

NameTypeDefault
nodesRecord<string, StesuraNodeSpec>

Custom node specs, merged over the core set (same key replaces the core node). Use StesuraNodeSpec for completion on Stesura spec keys (e.g. spacingRole).

marksRecord<string, MarkSpec>

Custom mark specs, merged over the core set.

excludeNodesreadonly string[]

Node names to leave out, applied after nodes is merged. A core node must belong to an EXCLUDABLE_NODE_FAMILIES family, excluded whole; nodes added through nodes can always be excluded. Grants in globalAttributes.nodes for an excluded node are dropped with it. Throws a RangeError otherwise, on unknown names, and when a remaining content expression names an excluded node.

globalAttributesGlobalAttributesConfig<D>

Global attributes: reusable attr bundles (numbering, spacing, formatting…) merged into node specs.

  • definitions registers custom global attributes. A key colliding with a core attribute is ignored with an error.
  • nodes adjusts which node types carry each attribute, as a delta on the defaults: true grants, false revokes, absent keeps the default. uniqueId cannot be configured (pagination requires ids on all blocks). Invalid config only logs. A node spec or custom definition declaring a reserved gate attr name throws a RangeError, since it would silently inherit plugin behavior.
directFormattingPartial<Record<"indent", boolean>>

Direct-formatting attrs to turn off, e.g. { indent: false }: the attr stays in the schema (its family’s gates key on it) but is never set directly, so the value comes from the style chain. Commands, Tab, the ruler, the paragraph panel, paste and DOCX import step aside, and directFormattingPlugin clears what still arrives. The derived indent of numbered blocks is unaffected.

StesuraNodeSpec

NodeSpec plus the Stesura-specific keys Stesura reads (cf. tableRole in prosemirror-tables), typed so custom nodes get completion. Add new spec keys here rather than reading untyped properties at the call site.

NameTypeDefault
spacingRoleSpacingRole

Spacing-plugin role. When absent, an unspaced wrapper-shaped node (block node with block content, not an atom) is "passThrough" and everything else is a "boundary". Set it only to override that inference.

measureAs"atomic"

"atomic": pagination measures this textblock as one unbreakable box instead of splitting it into lines (a rendered formula or diagram whose text content is its source).

keepTogetherboolean

A wrapper (block node with block content) that pagination places whole when it fits a page: pushed to the next page rather than split. One taller than a page still splits between its children.

defaultSpacing{ before?: number; after?: number; }

Spacing (px) for a spaced node with neither its own spacing nor a style providing one, e.g. a callout. Collapses with its neighbors’ like any other.

directFormattingPartial<Record<"indent", boolean>>

doc only: the direct-formatting attrs the schema turns off (see allowsDirectFormatting).

contentstring

The content expression for this node, as described in the schema guide . When not given, the node does not allow any content.

marksstring

The marks that are allowed inside of this node. May be a space-separated string referring to mark names or groups, "_" to explicitly allow all marks, or "" to disallow marks. When not given, nodes with inline content default to allowing all marks, other nodes default to not allowing marks.

groupstring

The group or space-separated groups to which this node belongs, which can be referred to in the content expressions for the schema.

inlineboolean

Should be set to true for inline nodes. (Implied for text nodes.)

atomboolean

Can be set to true to indicate that, though this isn’t a leaf node , it doesn’t have directly editable content and should be treated as a single unit in the view.

attrs{ [name: string]: AttributeSpec; }

The attributes that nodes of this type get.

selectableboolean

Controls whether nodes of this type can be selected as a node selection . Defaults to true for non-text nodes.

draggableboolean

Determines whether nodes of this type can be dragged without being selected. Defaults to false.

codeboolean

Can be used to indicate that this node contains code, which causes some commands to behave differently.

whitespace"pre" | "normal"

Controls way whitespace in this a node is parsed. The default is "normal", which causes the DOM parser  to collapse whitespace in normal mode, and normalize it (replacing newlines and such with spaces) otherwise. "pre" causes the parser to preserve spaces inside the node. When this option isn’t given, but code is true, whitespace will default to "pre". Note that this option doesn’t influence the way the node is rendered—that should be handled by toDOM and/or styling.

definingAsContextboolean

Determines whether this node is considered an important parent node during replace operations (such as paste). Non-defining (the default) nodes get dropped when their entire content is replaced, whereas defining nodes persist and wrap the inserted content.

definingForContentboolean

In inserted content the defining parents of the content are preserved when possible. Typically, non-default-paragraph textblock types, and possibly list items, are marked as defining.

definingboolean

When enabled, enables both definingAsContext and definingForContent.

isolatingboolean

When enabled (default is false), the sides of nodes of this type count as boundaries that regular editing operations, like backspacing or lifting, won’t cross. An example of a node that should probably have this enabled is a table cell.

toDOM(node: Node) => DOMOutputSpec

Defines the default way a node of this type should be serialized to DOM/HTML (as used by DOMSerializer.fromSchema). Should return a DOM node or an array structure  that describes one, with an optional number zero (“hole”) in it to indicate where the node’s content should be inserted.

For text nodes, the default is to create a text DOM node. Though it is possible to create a serializer where text is rendered differently, this is not supported inside the editor, so you shouldn’t override that in your text node spec.

parseDOMreadonly TagParseRule[]

Associates DOM parser information with this node, which can be used by DOMParser.fromSchema to automatically derive a parser. The node field in the rules is implied (the name of this node will be filled in automatically). If you supply your own parser, you do not need to also specify parsing rules in your schema.

toDebugString(node: Node) => string

Defines the default way a node of this type should be serialized to a string representation for debugging (e.g. in error messages).

leafText(node: Node) => string

Defines the default way a leaf node  of this type should be serialized to a string (as used by Node.textBetween and Node.textContent).

linebreakReplacementboolean

A single inline node in a schema can be set to be a linebreak equivalent. When converting between block types that support the node and block types that don’t but have whitespace set to "pre", setBlockType will convert between newline characters to or from linebreak nodes as appropriate.

Other exports

ExportTypeDescription
BLOCK_TRACK_CHANGES_NODESstring[]Default nodes carrying block-level track changes (trackChanges and trackChangesModification).
FLOATING_NODESstring[]Default nodes carrying the floating placement family (wrap, anchorPosition, wrapDistance, zIndex): positioned objects anchored in a textblock.
FORMATTED_NODESstring[]Default nodes carrying the formatting global attributes (formatting, which injects indent, plus textAlign / direction / suppressLineNumbers).
GATE_ATTRSreadonly ["numbering", "pagination", "indent", "spacing", "styleId", "proofingLanguage", "trackChanges"]The attrs the predicates key on, one per predicate. Reserved: a node spec or custom global attribute declaring one throws a RangeError.
GateAttr"numbering" | "pagination" | "indent" | "spacing" | "styleId" | "proofingLanguage" | "trackChanges"
GlobalAttributeKey"numbering" | "proofingLanguage" | "formatting" | "textAlign" | "spacing" | "styleId" | "blockStyling" | "uniqueId" | "direction" | "trackChanges" | "trackChangesModification" | "suppressLineNumbers" | "nodeComment" | "pagination" | "blockContentClasses"Names of the core global attributes.
GlobalAttributeNodesDeltaGlobalAttributeNodesDeltaNode-binding delta for one global attribute: true grants it to the node type, false revokes a default binding, absent keeps the default.
NodeNameValue"doc" | "paragraph" | "heading" | "counter_node" | "toc" | "horizontal_rule" | "page_break" | "image" | "image_anchored" | "math_inline" | "math_display" | "table" | "table_row" | "table_cell" | "code_block" | "hard_break" | "boundary_open_node" | "boundary_close_node" | "page_number" | "comment_open" | "comment_close" | "upload_block" | "file" | "header_footer_content" | "section" | "section_header" | "section_footer" | "section_content" | "footnotes" | "footnote_anchor" | "footnote_body" | "endnotes" | "endnote_anchor" | "endnote_body" | "cross_reference"
NUMBERED_NODESstring[]Default nodes carrying the numbering attr.
PAGINATED_NODESstring[]Default nodes carrying the pagination attr (keepWithNext / keepLines / widowOrphan / pageBreakBefore).
PROOFREAD_NODESstring[]Default nodes carrying the proofingLanguage attr.
SPACED_NODESstring[]Default nodes carrying the spacing attr.
SPAN_COLUMNS_NODESstring[]Default nodes carrying spanColumns: titles and wide figures in a column section.
SpacingRole"passThrough" | "boundary"How a non-spaced block container takes part in the spacing plugin’s margin-collapse chains: "passThrough": its children join the surrounding chain, so margins collapse across its edges. The inferred default for wrapper nodes (block nodes with block content). "boundary": its children form an isolated chain (like a table cell).
STYLED_BLOCK_NODESstring[]Default nodes carrying block styling (styleId and blockStyling).

Redaction attribute

REDACTED_LEAF_NODES lists the core block leaves that take the redaction global attribute (a picture, an equation, an embedded file); a package’s own (Mermaid’s diagram) grants it through globalAttributes. Inline content takes the redaction mark instead. REDACTION_REGION_NODES lists the pictures that take redactionRegions, their redacted areas.

Last updated on