Skip to content

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

NameSummary
.ctor

Properties

NameSummary
SegmentsGets the segments in the document.
PlainTextGets the raw HTML content of the document.
RenderedTextGets the rendered plain-text projection of the document.
LengthGets the total rendered text length, excluding markup tags.

Methods

NameSummary
SetTextSets the document text, replacing existing content.
AppendTextAppends text to the end of the document.
InsertInserts text at the specified offset.
DeleteDeletes text in the provided range.
ReplaceReplaces a range with new text.
ToggleFormattingToggles formatting for a range of text by wrapping the HTML selection with tags.
ClearFormattingClears all formatting information, keeping the textual content.
GetTextRangeGets rendered text for a document range.
GetHtmlRangeGets the source HTML fragment for a rendered document range.
Inherited members