docx
    Preparing search index...

    Function createAlignment

    • Creates paragraph alignment (justification) element for a WordprocessingML document.

      The jc element specifies the horizontal alignment of all text in the paragraph.

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

      <xsd:complexType name="CT_Jc">
      <xsd:attribute name="val" type="ST_Jc" use="required"/>
      </xsd:complexType>

      Parameters

      • type:
            | "center"
            | "left"
            | "right"
            | "end"
            | "both"
            | "start"
            | "mediumKashida"
            | "distribute"
            | "numTab"
            | "highKashida"
            | "lowKashida"
            | "thaiDistribute"

      Returns XmlComponent

      new Paragraph({
      alignment: AlignmentType.CENTER,
      children: [new TextRun("Centered text")],
      });