Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/docxml/src/components/Paragraph.ts>Paragraph

TypeScript (component) library for building and parsing a DOCX file
Go to Latest
class Paragraph
extends Component<ParagraphProps, ParagraphChild>
import { Paragraph } from "https://deno.land/x/docxml@5.5.3/src/components/Paragraph.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

setSectionProperties(properties?: SectionProperties | null)

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.