@tiptap-pro/extension-export-docx Changelog

Changelog for @tiptap-pro/extension-export-docx

0.17.0

Minor Changes

  • 3037696: Add export docx missing overrides for header and footers
  • 8314927: DOCX export now serializes subscript and superscript text marks. Content like H₂O and x² preserves its formatting on export, where it was previously emitted as plain text.

Patch Changes

  • 7b39914: Update fast-xml-parser to patch vulnerabilities CVE-2026-33349 and CVE-2026-41650

0.16.1

Patch Changes

  • dc8aea8: Fix image dimensions in DOCX export. Images were previously shrunk to 75 % of their intended size because pixel values were converted to points before being passed to docx's ImageRun.transformation, which already expects pixels at 96 dpi.

0.16.0

Minor Changes

  • 21ba8e3: Add support for paragraph, table, text run, table cell, and image overrides in header and footer content. Also add a new headerFooterOverrides option for styling headers and footers separately from the body.

    • convertHeader and convertFooter now accept these options: customNodes, pageSize, pageMargins, tableOverrides, tableCellOverrides, paragraphOverrides, textRunOverrides, imageOverrides. Before, header and footer content was always converted with default values, so the overrides did not work.
    • New option headerFooterOverrides in ExportDocxOptions. You can use this to style header and footer content different from the body. Each field replaces the body-wide value, it does not merge. If a field is not set, it uses the body value. This only works for headers and footers that come from the Pages extension.
    • Fix: when you set paragraphOverrides.spacing.before or spacing.after, the values were lost because the code overwrote the spacing object with only spacing.line. Now before, after, and line all work together.
  • 9ee712b: Add header and footer properties to the pageMargins option, controlling the distance from the page edge to the header/footer. When the Pages extension is configured, these values are auto-derived from headerTopMargin and footerBottomMargin; caller-provided values always take precedence.

    For extension-export-pdf, extension-export-doc, and extension-export-odt, full end-to-end support requires the Tiptap convert service to be on a version that accepts the new pageMargins.header/footer fields and ships an updated @tiptap-pro/extension-export-docx.

0.15.5

Patch Changes

  • 0668f9f: Render {page} and {total} tokens in plain-text headers and footers as live PageNumber.CURRENT / PageNumber.TOTAL_PAGES fields, so exported DOCX files show the actual page number and total page count instead of the literal token strings.

0.15.4

Patch Changes

  • 5da418d: Inline images inside a paragraph now inherit the paragraph's formatting (alignment, line spacing, paragraphOverrides, heading level, list numbering) in the DOCX export. Previously these attributes were dropped because the image was emitted as its own wrapper paragraph. Block-level images (siblings of paragraphs) and the public convertImage API are unchanged; a new convertImageRun helper is exported for callers that need the raw inline run.

0.15.3

Patch Changes

  • 2bce939: Fix DOCX rendering in viewers that don't support universal measures by converting page dimensions and margins to numeric twips, and add explicit document defaults for font size, font family, and language settings

0.15.2

Patch Changes

  • 0608c46: Minor bugfixes & improvements

0.15.1

Patch Changes

  • 7687264: fix: do not overwrite global default styles

0.15.0

Minor Changes

  • 057256a: Add page break support to DOCX export. The pageBreak node is now converted to a <w:br w:type="page"/> element, producing a standard Word page break in the exported document. A new convertPageBreak function is also publicly exported for use in custom node conversion pipelines.

0.14.0

Minor Changes

  • 9fa3d3d: Fix table cells only rendering paragraphs by delegating to the central node converter, enabling support for lists, headings, images, blockquotes, and nested tables inside table cells

0.13.0

Minor Changes

  • fcd13d5: Extend DOCX export with deep customization overrides for paragraphs, text runs, table cells, and images.

    tableOverrides (new)

    Allows overriding any ITableOptions property except rows. Values are spread last, so user-provided table-level properties (borders, margins, layout) win over computed defaults.

    paragraphOverrides (new)

    Accepts any IParagraphOptions property except children. Spread first as base defaults — per-node computed values like alignment, spacing, heading level, and list numbering override them. Applied to all paragraph creation paths: standard paragraphs, headings, blockquotes, bullet lists, ordered lists, and list items.

    textRunOverrides (new)

    Accepts any IRunOptions property except text. Spread first as base defaults — per-mark formatting (bold, italic, underline, font family, font size, color, highlight, etc.) overrides them. Useful for setting a default font or size across the entire exported document. Applied to all text run creation paths including styled paragraphs (e.g. blockquotes) and standard content.

    tableCellOverrides (new)

    Accepts any ITableCellOptions property except children. Spread first as base defaults — per-cell computed values like width, column span, and width type override them. Useful for applying consistent cell shading, vertical alignment, or border styles across all table cells.

    imageOverrides (new)

    Accepts any IImageOptions property except data, type, and fallback. Spread last so user-provided values (e.g. custom transformation dimensions) win over the intrinsic dimensions detected from the image buffer. SVG fallback data is always preserved regardless of overrides.

    Usage example

    editor.commands.exportDocx({
      onCompleteExport: (result) => {
        /* ... */
      },
      exportType: "blob",
      paragraphOverrides: {
        spacing: { after: 200, before: 100 },
      },
      textRunOverrides: {
        font: "Arial",
        size: 24, // 12pt in half-points
      },
      tableCellOverrides: {
        shading: { fill: "F0F0F0", type: ShadingType.SOLID },
      },
      imageOverrides: {
        transformation: { width: 400, height: 300 },
      },
    });

    Note: All override objects use shallow spreading, not deep merging. When overriding nested properties like spacing or transformation, provide the complete nested object to avoid undefined fields.


    Node attribute inference (new)

    The DOCX export now respects node-level attributes set by the editor instead of always computing values from scratch.

    Image width/height from node attrs

    When an image has been resized in the editor (via ResizableNodeView), the user-set width and height attributes are now used for the exported dimensions instead of the intrinsic image dimensions. If only one dimension is set, the other is computed proportionally from the intrinsic aspect ratio. Priority chain: imageOverrides.transformation > node.attrs.width/height > intrinsic dimensions.

    Image alt text

    The alt attribute on image nodes is now mapped to the docx altText property (DocPropertiesOptions.name), providing accessibility metadata in the exported document.

    Table cell colwidth

    When table columns have been resized in the editor, the per-cell colwidth attribute (pixel array) is now used to compute precise column widths in the export. Falls back to even distribution when colwidth is not set.

    Table cell rowspan

    The rowspan attribute on table cells is now supported. Cells spanning multiple rows are correctly exported with the rowSpan property in the docx output.

    Paragraph textAlign: 'justify'

    Justified text alignment is now correctly mapped to AlignmentType.JUSTIFIED in the export. Previously, 'justify' fell through to left alignment.

    Text run backgroundColor

    The backgroundColor attribute on the textStyle mark is now exported as solid character shading on text runs. Previously, inline background colors were silently dropped.

  • fcd13d5: Initial beta point for export and pages packages

3.0.0-beta.31

3.0.0-beta.30

Patch Changes

  • 7f9455b: Bumped Tiptap and Hocuspocus Dependencies to most recent version

3.0.0-beta.29

3.0.0-beta.28

3.0.0-beta.27

3.0.0-beta.26

3.0.0-beta.25

Patch Changes

  • 77a7769: Bumped @tiptap and @hocuspocus dependencies

3.0.0-beta.24

Patch Changes

  • aca403d: Bump tiptap and hocuspocus dependencies

3.0.0-beta.23

3.0.0-beta.22

Patch Changes

  • e369685: upgraded hocuspocus and tiptap dependencies

3.0.0-beta.21

3.0.0-beta.20

Patch Changes

  • 6b08d0c: Bumped tiptap and hocuspocus dependencies

3.0.0-beta.19

3.0.0-beta.18

Patch Changes

  • 40d6b02: updated tiptap and hocuspocus dependencies

3.0.0-beta.17

3.0.0-beta.16

Patch Changes

  • b31ecec: Updated tiptap packages

3.0.0-beta.15

Major Changes

  • 953106f: Updated all tiptap dependencies

0.1.0

Initial release of extension-export-docx as beta version.