docx
    Preparing search index...

    Class Comments

    Represents the comments container in a WordprocessingML document.

    This is the root element for the comments.xml file that stores all comment definitions in the document. When any comment uses parentId, threading is activated and thread data is generated for commentsExtended.xml.

    Reference: http://officeopenxml.com/WPrun.php

    <xsd:element name="comments" type="CT_Comments"/>
    <xsd:complexType name="CT_Comments">
    <xsd:sequence>
    <xsd:element name="comment" type="CT_Comment" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    new Comments({
    children: [
    {
    id: 0,
    author: "John Doe",
    children: [new Paragraph("First comment")],
    },
    {
    id: 1,
    author: "Jane Smith",
    parentId: 0,
    children: [new Paragraph("Reply to first comment")],
    },
    ],
    });

    Hierarchy (View Summary)

    Index
    • get writtenAs(): readonly BaseXmlComponent[] | undefined
      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.

      Returns readonly BaseXmlComponent[] | undefined