RichTextDocument class¶
Defined in
Namespace: CrissCross.Avalonia.UI.Controls
Assembly: CrissCross.Avalonia.UI.dll
Full name: CrissCross.Avalonia.UI.Controls.RichTextDocument
Modifiers: public
Summary¶
Represents a document model for rich text content with formatting information.
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471
Constructors¶
| Name | Summary |
|---|---|
| .ctor |
Properties¶
| Name | Summary |
|---|---|
| Segments | Gets the segments in the document. |
| PlainText | Gets the raw HTML content of the document. |
| RenderedText | Gets the rendered plain-text projection of the document. |
| Length | Gets the total rendered text length, excluding markup tags. |
Methods¶
| Name | Summary |
|---|---|
| SetText | Sets the document text, replacing existing content. |
| AppendText | Appends text to the end of the document. |
| Insert | Inserts text at the specified offset. |
| Delete | Deletes text in the provided range. |
| Replace | Replaces a range with new text. |
| ToggleFormatting | Toggles formatting for a range of text by wrapping the HTML selection with tags. |
| ClearFormatting | Clears all formatting information, keeping the textual content. |
| GetTextRange | Gets rendered text for a document range. |
| GetHtmlRange | Gets the source HTML fragment for a rendered document range. |