docx
    Preparing search index...

    Function createVmlShape

    • Creates a VML shape element.

      The VML shape element (v:shape) represents a vector graphics shape in WordprocessingML documents. The shape's appearance is determined by its type (a reference to a v:shapetype), its style, and its children.

      <xsd:complexType name="CT_Shape">
      <xsd:choice maxOccurs="unbounded">
      <xsd:group ref="EG_ShapeElements"/>
      <xsd:element ref="o:ink"/>
      <xsd:element ref="pvml:iscomment"/>
      <xsd:element ref="o:equationxml"/>
      </xsd:choice>
      <xsd:attributeGroup ref="AG_AllCoreAttributes"/>
      <xsd:attributeGroup ref="AG_AllShapeAttributes"/>
      <xsd:attributeGroup ref="AG_Type"/>
      <xsd:attributeGroup ref="AG_Adj"/>
      <xsd:attributeGroup ref="AG_Path"/>
      <xsd:attribute ref="o:gfxdata"/>
      <xsd:attribute name="equationxml" type="xsd:string" use="optional"/>
      </xsd:complexType>

      Parameters

      Returns XmlComponent

      An XmlComponent representing the v:shape element

      Text boxes are drawn with it, and so are the watermarks in docx/watermarks.

      const shape = createVmlShape({
      id: "box",
      type: "#_x0000_t202",
      style: { position: "absolute", width: "200pt", height: "50pt", rotation: 10 },
      fillColor: "silver",
      stroked: false,
      });