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

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

TypeScript (component) library for building and parsing a DOCX file
Go to Latest
class Text
import { Text } from "https://deno.land/x/docxml@5.11.2/src/components/Text.ts";

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.

Methods

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): Text

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.