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

Method add_paragraph

src/docx/document.py:109–119  ·  view source on GitHub ↗

Return paragraph newly added to the end of the document. The paragraph is populated with `text` and having paragraph style `style`. `text` can contain tab (``\\t``) characters, which are converted to the appropriate XML form for a tab. `text` can also include newline (``\\n

(self, text: str = "", style: str | ParagraphStyle | None = None)

Source from the content-addressed store, hash-verified

107 return paragraph
108
109 def add_paragraph(self, text: str = "", style: str | ParagraphStyle | None = None) -> Paragraph:
110 """Return paragraph newly added to the end of the document.
111
112 The paragraph is populated with `text` and having paragraph style `style`.
113
114 `text` can contain tab (``\\t``) characters, which are converted to the
115 appropriate XML form for a tab. `text` can also include newline (``\\n``) or
116 carriage return (``\\r``) characters, each of which is converted to a line
117 break.
118 """
119 return self._body.add_paragraph(text, style)
120
121 def add_picture(
122 self,

Callers 5

given_a_runFunction · 0.95
add_headingMethod · 0.95
add_page_breakMethod · 0.95
add_pictureMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected