MCPcopy Index your code
hub / github.com/python-openxml/python-docx / add_p_before

Method add_p_before

src/docx/oxml/text/paragraph.py:33–37  ·  view source on GitHub ↗

Return a new ` ` element inserted directly prior to this one.

(self)

Source from the content-addressed store, hash-verified

31 r = ZeroOrMore("w:r")
32
33 def add_p_before(self) -> CT_P:
34 """Return a new `<w:p>` element inserted directly prior to this one."""
35 new_p = cast(CT_P, OxmlElement("w:p"))
36 self.addprevious(new_p)
37 return new_p
38
39 @property
40 def alignment(self) -> WD_PARAGRAPH_ALIGNMENT | None:

Callers 1

Calls 1

OxmlElementFunction · 0.90

Tested by

no test coverage detected