@mdast2docx/core
Version:
Core engine to convert extended MDAST to DOCX. Supports plugins for footnotes, images, lists, tables, and more. Designed for seamless Markdown-to-DOCX conversion.
14 lines (13 loc) • 635 B
TypeScript
import type { Root } from "@m2d/mdast";
import type { Definitions, FootnoteDefinitions, ISectionProps, DocxSection } from "./utils";
import * as docx from "docx";
/**
* Converts an MDAST tree to a DOCX document section.
* @param node - The root MDAST node
* @param definitions - Definitions mapping
* @param footnoteDefinitions - Footnote definitions mapping
* @param props - Section properties (optional)
* @returns A DOCX section representation
*/
export declare const toSection: (node: Root, definitions: Definitions, footnoteDefinitions: FootnoteDefinitions, props?: ISectionProps) => Promise<DocxSection>;
export { docx };