Skip to main content
Module

x/docxml/mod.ts

An experimental Deno tool to transform XML to DOCX with a little XPath- and component based configuration
Go to Latest
import * as docxml from "https://deno.land/x/docxml@3.0.1/mod.ts";

Classes

A component that represents a line break, page break or section break in a DOCX document. Place this in one of the <Text>, <TextAddition> or <TextDeletion> components.

A component that represents a table cell.

Represents the DOCX file as a whole, and collates other responsibilities together. Provides access to DOCX content types (ContentTypes), relationships (Relationships), the document itself (OfficeDocument).

A component that represents an image in your DOCX document. You can create a new image by passing any promise to an Uint8Array into the data prop, eg. get it from your file system or from a web request.

A component that represents a paragraph in your DOCX document, which is one of the most widely used components and the most likely to contain a style rule or other.

A component that represents a table row.

A component that represents a change-tracked table row that was inserted. Works the same way as a normal row, but requires some props describing the change.

A component that represents a change-tracked table row that was deleted. Works the same way as a normal row, but requires some props describing the change.

A component that represents a DOCX section, which could have its own page sizing options and so on.

A component that represents a table.

A component that represents text. All inline formatting options, such as bold/italic/underline, are in fact different props or styles on the <Text> component.

A component that represents a change-tracked text that was inserted.

A component that represents a change-tracked text that was deleted.

Functions

Converts centimeters to any of the other units of length.

Converts English metric units to any of the other units of length.

Converts half-points to any of the other units of length.

Converts inches to any of the other units of length.

The JSX pragma with which you can write <Paragraph> instead of new Paragraph({}).

Converts points to any of the other units of length.

Converts twentieth-points to any of the other units of length.

Type Aliases

A type describing the components accepted as children of Break.

A type describing the props accepted by Break.

A type describing the components accepted as children of Cell.

A type describing the props accepted by Cell.

A custom function which which native components can be composed into something more easily reusable.

A type describing the components accepted as children of Image.

A type describing the props accepted by Image.

An object that describes a size or length in various cross-computable units. Useful for telling the library how centimeters you would like one thing to be, while the one thing is defined as twentieth- points, EMU's or ostriches behind the scenes.

A type describing the components accepted as children of Paragraph.

A type describing the props accepted by Paragraph.

A type describing the components accepted as children of RowAddition.

A type describing the props accepted by RowAddition.

A type describing the components accepted as children of Row.

A type describing the components accepted as children of RowDeletion.

A type describing the props accepted by RowDeletion.

A type describing the props accepted by Row.

A type describing the components accepted as children of Section.

A type describing the props accepted by Section.

A type describing the components accepted as children of Table.

A type describing the props accepted by Table.

A type describing the components accepted as children of TextAddition.

A type describing the props accepted by TextAddition.

A type describing the components accepted as children of Text.

A type describing the components accepted as children of TextDeletion.

A type describing the props accepted by TextDeletion.

A type describing the props accepted by Text.