Skip to main content
Module

x/docxml/mod.ts>Paragraph

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

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 paragraph is a block-level element and contains text and inlines, see also Text.

Methods

Set properties to the section that this paragraph is supposed to represent. Not intended to be called manually. Only here because OOXML somehow decided that a section is defined in the last paragraph of it, rather than as an element of its own.

toNode(ancestry: ComponentAncestor[]): Promise<Node>

Creates an XML DOM node for this component instance.

Static Properties

readonly
children: string[]
readonly
mixed: boolean

Static Methods

fromNode(node: Node): Paragraph

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.