Class
RadRichTextEditor

A comprehensive rich text editor control for .NET MAUI applications that provides WYSIWYG (What You See Is What You Get) editing capabilities for HTML content. The RadRichTextEditor offers an intuitive interface for creating, editing, and formatting rich text documents with extensive formatting options and multimedia support.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class RadRichTextEditor : RadContentView, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout

Inheritance: objectRadContentViewRadRichTextEditor

Implements: IContentViewICrossPlatformLayoutIElementIPaddingIRadContentViewITransformIView

Inherited Members RadContentView.ActualStyleClassPropertyRadContentView.OnChildAdded(Element)RadContentView.OnChildRemoved(Element, int)RadContentView.OnBindingContextChanged()RadContentView.OnHandlerChanged()

Constructors

RadRichTextEditor()

Initializes a new instance of the RadRichTextEditor class.

Declaration

cs-api-definition
public RadRichTextEditor()

Fields

AutoGenerateContextMenuProperty

Identifies the AutoGenerateContextMenu property.

Declaration

cs-api-definition
public static readonly BindableProperty AutoGenerateContextMenuProperty

Field Value

BindableProperty

BackgroundColorProperty

Identifies the BackgroundColor property.

Declaration

cs-api-definition
public static readonly BindableProperty BackgroundColorProperty

Field Value

BindableProperty

BorderColorProperty

Identifies the BorderColor property.

Declaration

cs-api-definition
public static readonly BindableProperty BorderColorProperty

Field Value

BindableProperty

BorderThicknessProperty

Identifies the BorderThickness property.

Declaration

cs-api-definition
public static readonly BindableProperty BorderThicknessProperty

Field Value

BindableProperty

BusyIndicatorContentProperty

Identifies the BusyIndicatorContent property.

Declaration

cs-api-definition
public static readonly BindableProperty BusyIndicatorContentProperty

Field Value

BindableProperty

BusyIndicatorTemplateProperty

Identifies the BusyIndicatorTemplate property.

Declaration

cs-api-definition
public static readonly BindableProperty BusyIndicatorTemplateProperty

Field Value

BindableProperty

CornerRadiusProperty

Identifies the CornerRadius property.

Declaration

cs-api-definition
public static readonly BindableProperty CornerRadiusProperty

Field Value

BindableProperty

FontAttributesProperty

Identifies the FontAttributes property.

Declaration

cs-api-definition
public static readonly BindableProperty FontAttributesProperty

Field Value

BindableProperty

FontFamilyProperty

Identifies the FontFamily property.

Declaration

cs-api-definition
public static readonly BindableProperty FontFamilyProperty

Field Value

BindableProperty

FontSizeProperty

Identifies the FontSize property.

Declaration

cs-api-definition
public static readonly BindableProperty FontSizeProperty

Field Value

BindableProperty

HighlightTextColorProperty

Identifies the HighlightTextColor property.

Declaration

cs-api-definition
public static readonly BindableProperty HighlightTextColorProperty

Field Value

BindableProperty

HorizontalTextAlignmentProperty

Identifies the HorizontalTextAlignment property.

Declaration

cs-api-definition
public static readonly BindableProperty HorizontalTextAlignmentProperty

Field Value

BindableProperty

IsBusyProperty

Identifies the IsBusy property.

Declaration

cs-api-definition
public static readonly BindableProperty IsBusyProperty

Field Value

BindableProperty

IsDocumentLoadedProperty

Identifies the IsDocumentLoaded property.

Declaration

cs-api-definition
public static readonly BindableProperty IsDocumentLoadedProperty

Field Value

BindableProperty

IsHyperlinkSelectedProperty

Identifies the IsHyperlinkSelected property.

Declaration

cs-api-definition
public static readonly BindableProperty IsHyperlinkSelectedProperty

Field Value

BindableProperty

IsImageSelectedProperty

Identifies the IsImageSelected property.

Declaration

cs-api-definition
public static readonly BindableProperty IsImageSelectedProperty

Field Value

BindableProperty

IsReadOnlyProperty

Identifies the IsReadOnly property.

Declaration

cs-api-definition
public static readonly BindableProperty IsReadOnlyProperty

Field Value

BindableProperty

ListTypeProperty

Identifies the ListType property.

Declaration

cs-api-definition
public static readonly BindableProperty ListTypeProperty

Field Value

BindableProperty

SelectionRangeProperty

Identifies the SelectionRange property.

Declaration

cs-api-definition
public static readonly BindableProperty SelectionRangeProperty

Field Value

BindableProperty

SourceProperty

Identifies the Source property.

Declaration

cs-api-definition
public static readonly BindableProperty SourceProperty

Field Value

BindableProperty

TextColorProperty

Identifies the TextColor property.

Declaration

cs-api-definition
public static readonly BindableProperty TextColorProperty

Field Value

BindableProperty

TextDecorationsProperty

Identifies the TextDecorations property.

Declaration

cs-api-definition
public static readonly BindableProperty TextDecorationsProperty

Field Value

BindableProperty

TextFormattingProperty

Identifies the TextFormatting property.

Declaration

cs-api-definition
public static readonly BindableProperty TextFormattingProperty

Field Value

BindableProperty

Properties

AlignCenterCommand

Gets a command to apply center text alignment in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand AlignCenterCommand { get; }

Property Value

ICommand

AlignJustifyCommand

Gets a command to apply justify text alignment in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand AlignJustifyCommand { get; }

Property Value

ICommand

AlignLeftCommand

Gets a command to apply left text alignment in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand AlignLeftCommand { get; }

Property Value

ICommand

AlignRightCommand

Gets a command to apply right text alignment in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand AlignRightCommand { get; }

Property Value

ICommand

ApplyHyperlinkCommand

Gets a command to apply a hyperlink in the RadRichTextEditor. The command takes a single paramerer of type RichTextHyperlink.

Declaration

cs-api-definition
public ICommand ApplyHyperlinkCommand { get; }

Property Value

ICommand

AutoGenerateContextMenu

Gets or sets a value indicating whether to auto-generate the RichTextEditorContextMenuItemBase items for the context menu for this RadRichTextEditor.

Declaration

cs-api-definition
public bool AutoGenerateContextMenu { get; set; }

Property Value

bool

BackgroundColor

Gets or sets the background color of the RadRichTextEditor.

Declaration

cs-api-definition
public Color BackgroundColor { get; set; }

Property Value

Color

BorderColor

Gets or sets the border color of the RadRichTextEditor.

Declaration

cs-api-definition
public Color BorderColor { get; set; }

Property Value

Color

BorderThickness

Gets or sets the border thickness of the RadRichTextEditor.

Declaration

cs-api-definition
public Thickness BorderThickness { get; set; }

Property Value

Thickness

BusyIndicatorContent

Gets the content to show when the RadRichTextEditor is performing a long-running operation.

Declaration

cs-api-definition
public View BusyIndicatorContent { get; }

Property Value

View

BusyIndicatorTemplate

Gets or sets a DataTemplate to be used when displaying a busy indicator during long-running operations, e.g. when loading HTML content. When no template is specified, a default busy indicator is shown.

Declaration

cs-api-definition
public DataTemplate BusyIndicatorTemplate { get; set; }

Property Value

DataTemplate

ClearFormattingCommand

Gets a command to clear the formatting of the text in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand ClearFormattingCommand { get; }

Property Value

ICommand

ContextMenuItems

Gets the collection of RichTextEditorContextMenuItemBases used to generate the items of the RadRichTextEditor context menu.

Declaration

cs-api-definition
public IList<RichTextEditorContextMenuItemBase> ContextMenuItems { get; }

Property Value

IList<RichTextEditorContextMenuItemBase>

CopyCommand

Gets a command to copy the selected HTML in the RadRichTextEditor to the clipboard.

Declaration

cs-api-definition
public ICommand CopyCommand { get; }

Property Value

ICommand

CornerRadius

Gets or sets the corner radius of the RadRichTextEditor.

Declaration

cs-api-definition
public Thickness CornerRadius { get; set; }

Property Value

Thickness

CutCommand

Gets a command to cut the selected HTML in the RadRichTextEditor to the clipboard.

Declaration

cs-api-definition
public ICommand CutCommand { get; }

Property Value

ICommand

FontAttributes

Gets or sets the RichTextFontAttributes of the text in the RadRichTextEditor at the current position or selection.

Declaration

cs-api-definition
public RichTextFontAttributes FontAttributes { get; set; }

Property Value

RichTextFontAttributes

FontFamily

Gets or sets the font family of the text in the RadRichTextEditor at the current position or selection.

Declaration

cs-api-definition
public string FontFamily { get; set; }

Property Value

string

FontSize

Gets or sets the font size of the text in the RadRichTextEditor at the current position or selection.

Declaration

cs-api-definition
public RichTextUnit FontSize { get; set; }

Property Value

RichTextUnit

HighlightTextColor

Gets or sets the highlight Color of the text in the RadRichTextEditor at the current position or selection.

Declaration

cs-api-definition
public Color HighlightTextColor { get; set; }

Property Value

Color

HorizontalTextAlignment

Gets or sets the RichTextHorizontalAlignment of the text in the RadRichTextEditor at the current position or selection.

Declaration

cs-api-definition
public RichTextHorizontalAlignment HorizontalTextAlignment { get; set; }

Property Value

RichTextHorizontalAlignment

IndentCommand

Gets a command to indent the text in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand IndentCommand { get; }

Property Value

ICommand

InsertImageCommand

Gets a command to insert an image in the RadRichTextEditor. The command takes a single paramerer of type RichTextImage.

Declaration

cs-api-definition
public ICommand InsertImageCommand { get; }

Property Value

ICommand

IsBusy

Gets a value indicating whether the RadRichTextEditor is performing a long-running operation.

Declaration

cs-api-definition
public bool IsBusy { get; }

Property Value

bool

IsDocumentLoaded

Gets a value indicating whether a document is currently loaded in the RadRichTextEditor.

Declaration

cs-api-definition
public bool IsDocumentLoaded { get; }

Property Value

bool

IsHyperlinkSelected

Gets a value indicating whether a hyperlink is currently selected in the RadRichTextEditor.

Declaration

cs-api-definition
public bool IsHyperlinkSelected { get; }

Property Value

bool

IsImageSelected

Gets a value indicating whether an image is currently selected in the RadRichTextEditor.

Declaration

cs-api-definition
public bool IsImageSelected { get; }

Property Value

bool

IsReadOnly

Gets or sets a value indicating whether the RadRichTextEditor is in a read-only mode.

Declaration

cs-api-definition
public bool IsReadOnly { get; set; }

Property Value

bool

ListType

Gets or sets the RichTextListType of the text in the RadRichTextEditor at the current position or selection.

Declaration

cs-api-definition
public RichTextListType ListType { get; set; }

Property Value

RichTextListType

OpenHyperlinkCommand

Gets a command to open a hyperlink in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand OpenHyperlinkCommand { get; }

Property Value

ICommand

OutdentCommand

Gets a command to outdent the text in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand OutdentCommand { get; }

Property Value

ICommand

PasteCommand

Gets a command to paste from the clipboard to the RadRichTextEditor. The command takes a single paramerer of type RichTextPasteType.

Declaration

cs-api-definition
public ICommand PasteCommand { get; }

Property Value

ICommand

RedoCommand

Gets a command to redo the last changes in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand RedoCommand { get; }

Property Value

ICommand

RemoveHyperlinkCommand

Gets a command to remove a hyperlink in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand RemoveHyperlinkCommand { get; }

Property Value

ICommand

RemoveImageCommand

Gets a command to remove an image in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand RemoveImageCommand { get; }

Property Value

ICommand

SelectAllCommand

Gets a command to select all in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand SelectAllCommand { get; }

Property Value

ICommand

SelectionRange

Gets or sets the selection range of the text in the RadRichTextEditor.

Declaration

cs-api-definition
public RichTextSelectionRange SelectionRange { get; set; }

Property Value

RichTextSelectionRange

Source

Gets or sets a RichTextSource providing a rich text to the RadRichTextEditor.

Declaration

cs-api-definition
public RichTextSource Source { get; set; }

Property Value

RichTextSource

TextColor

Gets or sets the Color of the text in the RadRichTextEditor at the current position or selection.

Declaration

cs-api-definition
public Color TextColor { get; set; }

Property Value

Color

TextDecorations

Gets or sets the RichTextDecorations of the text in the RadRichTextEditor at the current position or selection.

Declaration

cs-api-definition
public RichTextDecorations TextDecorations { get; set; }

Property Value

RichTextDecorations

TextFormatting

Gets or sets the RichTextFormatting of the text in the RadRichTextEditor at the current position or selection.

Declaration

cs-api-definition
public RichTextFormatting TextFormatting { get; set; }

Property Value

RichTextFormatting

ToggleBoldCommand

Gets a command to toggle the bold text style in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand ToggleBoldCommand { get; }

Property Value

ICommand

ToggleBulletingCommand

Gets a command to toggle the bullets paragraph style in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand ToggleBulletingCommand { get; }

Property Value

ICommand

ToggleItalicCommand

Gets a command to toggle the italic text style in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand ToggleItalicCommand { get; }

Property Value

ICommand

ToggleNumberingCommand

Gets a command to toggle the numbering paragraph style in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand ToggleNumberingCommand { get; }

Property Value

ICommand

ToggleStrikethroughCommand

Gets a command to toggle the strike-through text style in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand ToggleStrikethroughCommand { get; }

Property Value

ICommand

ToggleSubscriptCommand

Gets a command to toggle the subscript text style in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand ToggleSubscriptCommand { get; }

Property Value

ICommand

ToggleSuperscriptCommand

Gets a command to toggle the superscript text style in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand ToggleSuperscriptCommand { get; }

Property Value

ICommand

ToggleUnderlineCommand

Gets a command to toggle the underline text style in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand ToggleUnderlineCommand { get; }

Property Value

ICommand

UndoCommand

Gets a command to undo the last changes in the RadRichTextEditor.

Declaration

cs-api-definition
public ICommand UndoCommand { get; }

Property Value

ICommand

Methods

GetHtmlAsync()

Gets asynchronously the currently edited content of the RadRichTextEditor as HTML.

Declaration

cs-api-definition
public Task<string> GetHtmlAsync()

Returns

Task<string>

Task<TResult> with the currently edited content as HTML.

GetHyperlinkAsync()

Gets asynchronously the hyperlink under the caret in the RadRichTextEditor.

Declaration

cs-api-definition
public Task<RichTextHyperlink> GetHyperlinkAsync()

Returns

Task<RichTextHyperlink>

An instance of the RichTextHyperlink class or null, if there is no hyperlink.

GetImageAsync()

Gets asynchronously the currently selected image in the RadRichTextEditor.

Declaration

cs-api-definition
public Task<RichTextImage> GetImageAsync()

Returns

Task<RichTextImage>

An instance of the RichTextImage class or null, if there is no image.

GetSelectionAsync()

Gets asynchronously the current text selection in the RadRichTextEditor.

Declaration

cs-api-definition
public Task<RichTextSelection> GetSelectionAsync()

Returns

Task<RichTextSelection>

An instance of the RichTextSelection class or null, if there is no text selection.

OnPropertyChanged(string)

Declaration

cs-api-definition
protected override void OnPropertyChanged(string propertyName = null)

Parameters

propertyName

string

Events

FontAttributesChanged

Raised when the FontAttributes property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<RichTextFontAttributes>> FontAttributesChanged

Event Value

EventHandler<ValueChangedEventArgs<RichTextFontAttributes>>

FontFamilyChanged

Raised when the FontFamily property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<string>> FontFamilyChanged

Event Value

EventHandler<ValueChangedEventArgs<string>>

FontSizeChanged

Raised when the FontSize property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<RichTextUnit>> FontSizeChanged

Event Value

EventHandler<ValueChangedEventArgs<RichTextUnit>>

HighlightTextColorChanged

Raised when the HighlightTextColor property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<Color>> HighlightTextColorChanged

Event Value

EventHandler<ValueChangedEventArgs<Color>>

HorizontalTextAlignmentChanged

Raised when the HorizontalTextAlignment property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<RichTextHorizontalAlignment>> HorizontalTextAlignmentChanged

Event Value

EventHandler<ValueChangedEventArgs<RichTextHorizontalAlignment>>

InsertImageError

Raised when an error occurs when inserting an image in the RadRichTextEditor.

Declaration

cs-api-definition
public event EventHandler<InsertImageErrorEventArgs> InsertImageError

Event Value

EventHandler<InsertImageErrorEventArgs>

IsHyperlinkSelectedChanged

Raised when the IsHyperlinkSelected property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<bool>> IsHyperlinkSelectedChanged

Event Value

EventHandler<ValueChangedEventArgs<bool>>

IsImageSelectedChanged

Raised when the IsImageSelected property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<bool>> IsImageSelectedChanged

Event Value

EventHandler<ValueChangedEventArgs<bool>>

IsReadOnlyChanged

Raised when the IsReadOnly property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<bool>> IsReadOnlyChanged

Event Value

EventHandler<ValueChangedEventArgs<bool>>

ListTypeChanged

Raised when the ListType property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<RichTextListType>> ListTypeChanged

Event Value

EventHandler<ValueChangedEventArgs<RichTextListType>>

OpenHyperlinkError

Raised when an error occurs when openning a hyperlink in the RadRichTextEditor.

Declaration

cs-api-definition
public event EventHandler<OpenHyperlinkErrorEventArgs> OpenHyperlinkError

Event Value

EventHandler<OpenHyperlinkErrorEventArgs>

PickImage

Raised when the user has requested to pick an image in the RadRichTextEditor.

Declaration

cs-api-definition
public event EventHandler<PickImageEventArgs> PickImage

Event Value

EventHandler<PickImageEventArgs>

SelectionRangeChanged

Raised when the SelectionRange property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<RichTextSelectionRange>> SelectionRangeChanged

Event Value

EventHandler<ValueChangedEventArgs<RichTextSelectionRange>>

TextColorChanged

Raised when the TextColor property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<Color>> TextColorChanged

Event Value

EventHandler<ValueChangedEventArgs<Color>>

TextDecorationsChanged

Raised when the TextDecorations property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<RichTextDecorations>> TextDecorationsChanged

Event Value

EventHandler<ValueChangedEventArgs<RichTextDecorations>>

TextFormattingChanged

Raised when the TextFormatting property of the RadRichTextEditor has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<RichTextFormatting>> TextFormattingChanged

Event Value

EventHandler<ValueChangedEventArgs<RichTextFormatting>>

In this article
DefinitionConstructorsRadRichTextEditor()FieldsAutoGenerateContextMenuPropertyBackgroundColorPropertyBorderColorPropertyBorderThicknessPropertyBusyIndicatorContentPropertyBusyIndicatorTemplatePropertyCornerRadiusPropertyFontAttributesPropertyFontFamilyPropertyFontSizePropertyHighlightTextColorPropertyHorizontalTextAlignmentPropertyIsBusyPropertyIsDocumentLoadedPropertyIsHyperlinkSelectedPropertyIsImageSelectedPropertyIsReadOnlyPropertyListTypePropertySelectionRangePropertySourcePropertyTextColorPropertyTextDecorationsPropertyTextFormattingPropertyPropertiesAlignCenterCommandAlignJustifyCommandAlignLeftCommandAlignRightCommandApplyHyperlinkCommandAutoGenerateContextMenuBackgroundColorBorderColorBorderThicknessBusyIndicatorContentBusyIndicatorTemplateClearFormattingCommandContextMenuItemsCopyCommandCornerRadiusCutCommandFontAttributesFontFamilyFontSizeHighlightTextColorHorizontalTextAlignmentIndentCommandInsertImageCommandIsBusyIsDocumentLoadedIsHyperlinkSelectedIsImageSelectedIsReadOnlyListTypeOpenHyperlinkCommandOutdentCommandPasteCommandRedoCommandRemoveHyperlinkCommandRemoveImageCommandSelectAllCommandSelectionRangeSourceTextColorTextDecorationsTextFormattingToggleBoldCommandToggleBulletingCommandToggleItalicCommandToggleNumberingCommandToggleStrikethroughCommandToggleSubscriptCommandToggleSuperscriptCommandToggleUnderlineCommandUndoCommandMethodsGetHtmlAsync()GetHyperlinkAsync()GetImageAsync()GetSelectionAsync()OnPropertyChanged(string)EventsFontAttributesChangedFontFamilyChangedFontSizeChangedHighlightTextColorChangedHorizontalTextAlignmentChangedInsertImageErrorIsHyperlinkSelectedChangedIsImageSelectedChangedIsReadOnlyChangedListTypeChangedOpenHyperlinkErrorPickImageSelectionRangeChangedTextColorChangedTextDecorationsChangedTextFormattingChanged
Not finding the help you need?
Contact Support