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@2.4.2/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.

The top-level configuration API for creating a new transformation of your XML input to a valid OOXML .docx file. Its properties and methods provide convenient access to registering transformation rules (Api.match) or more fine-grained control of the contents of the DOCX.

c
Document
deprecated

A component that represents the document itself.

Represents the .docx file, which is essentially a ZIP archive with a bunch of XML files and some naming conventions.

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.

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 Document.

A type describing the props accepted by Document.

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.