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

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

TypeScript library for parsing and building a DOCXML file
Go to Latest
class Section
import { Section } from "https://deno.land/x/docxml@5.2.0/src/components/Section.ts";

A component that represents a DOCX section, which could have its own page sizing options and so on.

In normal OOXML this information belongs at either the end of the document, or inside the formatting options of the last paragraph belonging to that section. This component will smooth that over in such a way that you can simply put <Paragraph> (etc.) inside <Section>.

Methods

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

Creates an XML DOM node for this component instance.

Static Properties

readonly
children: string[]
readonly
mixed: boolean

Static Methods

fromNode(node: Node): Section

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.