UNPKG

@mdast2docx/remark-docx

Version:

A unified plugin to prepare MDAST trees for DOCX conversion using mdast2docx.

19 lines (18 loc) 764 B
import type { Plugin } from "unified"; import type { Root } from "mdast"; import { OutputType } from "docx"; import { IDocxProps, ISectionProps } from "mdast2docx"; /** * A unified compiler plugin to convert MDAST to DOCX output using `mdast2docx`. * * @param outputType - The output type for DOCX generation (e.g. "blob", "buffer", "base64"). * Defaults to `"blob"`. * @param docxProps - Global DOCX document properties passed to `toDocx`. Optional. * @param sectionProps - Section-level props including plugin overrides. Optional. * @returns A unified plugin that injects a DOCX compiler. */ export declare const remarkDocx: Plugin<[ outputType?: OutputType, docxProps?: IDocxProps, sectionProps?: ISectionProps ], Root>;