Skip to main content
Module

x/docxml/mod.ts>Cell

An experimental Deno tool to transform XML to DOCX with a little XPath- and component based configuration
Go to Latest
class Cell
extends Component<CellProps, CellChild>
import { Cell } from "https://deno.land/x/docxml@3.0.1/mod.ts";

A component that represents a table cell.

For MS Word to be happy any cell needs to have a paragraph as the last child. This component will quietly fix that for you if you don't have a paragraph there already.

Methods

toNode(ancestry: ComponentAncestor[]): Node

Creates an XML DOM node for this component instance.

toRepeatingNode(
ancestry: ComponentAncestor[],
column: number,
_row: number,
): Node | null

Static Properties

readonly
children: string[]
readonly
mixed: boolean

Static Methods

fromNode(node: Node): Cell

Instantiate this component from the XML in an existing DOCX file.

matchesNode(node: Node): boolean

Asserts whether or not a given XML node correlates with this component.