Block
Übersicht
Block ist eine Klasse in Aspose.Words FOSS für Python.
Basisklasse für jeden Knoten im Markdown-Blockbaum.
Diese Klasse stellt 3 Methoden zur Arbeit mit Block-Objekten in Python-Programmen bereit. Verfügbare Methoden sind: __init__, add_child, get_parent. Alle öffentlichen Mitglieder sind für jede Python-Anwendung nach der Installation des Aspose.Words FOSS für Python-Pakets zugänglich. Eigenschaften: block_level, children, is_first_child, is_last_child, next_sibling, parent und 2 weitere.
Eigenschaften
| Name | Typ | Zugriff | Beschreibung |
|---|---|---|---|
is_first_child | bool | Lesen | Ermittelt, ob es das erste Kind ist. |
is_last_child | bool | Lesen | Gibt das IsLastChild zurück. |
next_sibling | Optional["Block"] | Lesen | Ruft das nächste Geschwisterelement ab. |
previous_sibling | Optional["Block"] | Lesen | Gibt das vorherige Geschwister-Element zurück. |
block_level | MarkdownBlockLevel | Lesen | Ermittelt die Blockebene. |
type | `` | Lesen | Gibt den Typ zurück. |
parent | Optional["Block"] | Lesen | Gibt das übergeordnete Element zurück. |
children | list["Block"] | Lesen | Gibt die Kinder zurück. |
Methoden
| Signatur | Beschreibung |
|---|---|
__init__(block_type: BlockType) | Calls init(block_type) in dieser Block-Instanz. |
add_child(child: "Block") → "Block" | Ruft add_child(child) in dieser Block-Instanz auf. |
get_parent() → Optional["Block"] | Gehe die Vorfahrenkette nach oben und gib den ersten Block zurück, dessen |
``type`` is one of *types*, or ``None`` if none matches. |