Convert the text frame to HTML. Args: style_args (StyleArg): The style arguments for HTML conversion. Returns: str: The HTML representation of the text frame.
(self, style_args: StyleArg)
| 132 | ) |
| 133 | |
| 134 | def to_html(self, style_args: StyleArg): |
| 135 | """ |
| 136 | Convert the text frame to HTML. |
| 137 | |
| 138 | Args: |
| 139 | style_args (StyleArg): The style arguments for HTML conversion. |
| 140 | |
| 141 | Returns: |
| 142 | str: The HTML representation of the text frame. |
| 143 | """ |
| 144 | if not self.is_textframe: |
| 145 | return "" |
| 146 | repr_list = [ |
| 147 | para.to_html(style_args) for para in self.paragraphs if para.idx != -1 |
| 148 | ] |
| 149 | return "\n".join([INDENT * self.level + repr for repr in repr_list]) |
| 150 | |
| 151 | def __repr__(self): |
| 152 | if not self.is_textframe: |