ReadonlyfileMarker property identifying this as a FileChild
ReadonlyoptionsThe options the paragraph was made with. A paragraph made from a string has it as its text
Internal
The paragraph's alignment and direction, which a table gives the empty paragraphs of the cells it adds below a
cell merged down rows (rowSpan), so that the merged cell is aligned as one.
Internal
The components written in this one's place, one after another, when it can't be written as a single element, such as a run with another run in its children. Undefined when it is written as itself.
Adds a child element to this component.
The child component or text string to add
This component (for chaining)
Internal
Ends a section at this paragraph by adding the section's properties to the paragraph's properties, as Word does with the last paragraph of each section but the last.
The body adds them only while it is written and removes them afterwards with removeSectionProperties, so the same paragraph can be used in other documents.
The properties of the section the paragraph ends
Prepares this component and its children for XML serialization.
This method is called by the Formatter to convert the component tree into an object structure compatible with the xml library (https://www.npmjs.com/package/xml). It recursively processes all children and handles special cases like attribute-only elements and empty elements.
The method can be overridden by subclasses to customize XML representation or execute side effects during serialization (e.g., creating relationships).
The serialization context containing document state
The XML-serializable object, or undefined to exclude from output
Internal
Removes the section properties added with addSectionProperties.
The properties of the section to remove
Makes a new paragraph with the paragraph's options and these, which take the place of its own, such as to indent the paragraphs a parser made. The paragraph itself is left as it is, and the new one has the same children.
Each option given replaces the paragraph's whole option: to keep the rest of its spacing, give
spacing: { ...paragraph.options.spacing, before: 240 }. An option given as undefined is removed.
Represents a paragraph in a WordprocessingML document.
A paragraph is the primary unit of block-level content in a document and can contain various inline elements such as text runs, images, hyperlinks, and bookmarks.
Reference: http://officeopenxml.com/WPparagraph.php
Public Api
XSD Schema
Example