IPlugin<T\>
Updated 5 min ago
Defined in: packages/core/src/utils/index.ts:208
Interface for extending MDAST to DOCX conversion using plugins.
Type Parameters
T
Properties
block?
optional block?: (docx, node, paraProps, blockChildrenProcessor, inlineChildrenProcessor) => (Paragraph | Table)[]
Defined in: packages/core/src/utils/index.ts:212
Processes block-level MDAST nodes and converts them to DOCX elements.
Parameters
docx
__module
node
ExtendedRootContent<T>
paraProps
MutableParaOptions
blockChildrenProcessor
BlockNodeChildrenProcessor
inlineChildrenProcessor
InlineChildrenProcessor
Returns
(Paragraph | Table)[]
inline?
optional inline?: (docx, node, runProps, definitions, footnoteDefinitions, inlineChildrenProcessor) => InlineDocxNodes[]
Defined in: packages/core/src/utils/index.ts:223
Processes inline-level MDAST nodes and converts them to DOCX runs.
Parameters
docx
__module
node
ExtendedRootContent<T>
runProps
MutableRunOptions
definitions
Definitions
footnoteDefinitions
FootnoteDefinitions
inlineChildrenProcessor
InlineChildrenProcessor
Returns
InlineDocxNodes[]
postprocess?
optional postprocess?: (sections) => void | Promise<void>
Defined in: packages/core/src/utils/index.ts:247
Post-processes the final DOCX document after conversion. Plugins can use this for cleanup or applying final transformations.
Parameters
sections
DocxSection[]
Returns
void | Promise<void>
preprocess?
optional preprocess?: (tree, definitions) => void | Promise<void>
Defined in: packages/core/src/utils/index.ts:241
Preprocesses the MDAST tree before the DOCX conversion begins.
Parameters
tree
definitions
Definitions
Returns
void | Promise<void>
root?
optional root?: (props) => void
Defined in: packages/core/src/utils/index.ts:236
Modifies document-level DOCX properties, such as styles, numbering, headers, or footers. Useful for applying global formatting customizations.
Parameters
props
Returns
void