RichText
Přehled
RichText je třída v Aspose.Note pro Python. Dědici: Node.
RichText.Append(text, style) přidává dodaný text s daným stylem na konec objektu bohatého textu a vrací stejnou instanci RichText pro řetězce.
Vlastnosti
| Název: | Typ: | Přístup | Popis: |
|---|---|---|---|
Text | str | Čtěte. | Vrátí souvislý prostý text RichText |
TextRuns | list[TextRun] | Čtěte. | Poskytuje seznam TextRun objektů reprezentujících stylované segmenty RichText |
ParagraphStyle | ParagraphStyle | Čtěte. | Získejte nebo nastavit ParagraphStyle aplikované na RichText |
Tags | list[NoteTag] | Čtěte. | Vrátí seznam NoteTag objektů připojených k RichText |
Length | int | Čtěte. | Vrátí počet znaků obsažených v RichText |
Alignment | `HorizontalAlignment | None` | Čtěte. |
IsTitleText | bool | Čtěte. | Uveďte, zda je RichText použit jako titulní textový prvek. |
IsTitleDate | bool | Čtěte. | Uveďte, zda RichText představuje datum titulu. |
IsTitleTime | bool | Čtěte. | Uveďte, zda RichText představuje čas titulu. |
Metody
| Podpis: | Popis: |
|---|---|
| `init(Text: str, TextRuns: list[TextRun] | None, ParagraphStyle: ParagraphStyle |
| `Append(text: str, style: TextStyle | None)→RichText` |
| `AppendFront(text: str, style: TextStyle | None)→RichText` |
Clear() → RichText | Odstraňuje veškerý obsah z RichText a vrací RichText |
GetEnumerator() → Iterator[str] | Vrátí iterátor na znaky RichText |
| `IndexOf(value: str, startIndex: int, count: int | None, comparison: str |
| `Insert(index: int, text: str, style: TextStyle | None)→RichText` |
| `Remove(start: int, count: int | None)→RichText` |
| `Replace(old_value: str, new_value: str, style: TextStyle | None)→RichText` |
Trim() → RichText | Odstraňuje přední a zadní bílý prostor z RichText a vrací RichText |
TrimStart() → RichText | |
TrimEnd() → RichText |