ClassRadRichTextEditor
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:
public class RadRichTextEditor : RadContentView, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout
Inheritance: objectRadContentViewRadRichTextEditor
Implements:
Inherited Members
Constructors
RadRichTextEditor()
Initializes a new instance of the RadRichTextEditor class.
Declaration
public RadRichTextEditor()
Fields
AutoGenerateContextMenuProperty
Identifies the AutoGenerateContextMenu property.
Declaration
public static readonly BindableProperty AutoGenerateContextMenuProperty
Field Value
BindableProperty
BackgroundColorProperty
Identifies the BackgroundColor property.
Declaration
public static readonly BindableProperty BackgroundColorProperty
Field Value
BindableProperty
BorderColorProperty
Identifies the BorderColor property.
Declaration
public static readonly BindableProperty BorderColorProperty
Field Value
BindableProperty
BorderThicknessProperty
Identifies the BorderThickness property.
Declaration
public static readonly BindableProperty BorderThicknessProperty
Field Value
BindableProperty
BusyIndicatorContentProperty
Identifies the BusyIndicatorContent property.
Declaration
public static readonly BindableProperty BusyIndicatorContentProperty
Field Value
BindableProperty
BusyIndicatorTemplateProperty
Identifies the BusyIndicatorTemplate property.
Declaration
public static readonly BindableProperty BusyIndicatorTemplateProperty
Field Value
BindableProperty
CornerRadiusProperty
Identifies the CornerRadius property.
Declaration
public static readonly BindableProperty CornerRadiusProperty
Field Value
BindableProperty
FontAttributesProperty
Identifies the FontAttributes property.
Declaration
public static readonly BindableProperty FontAttributesProperty
Field Value
BindableProperty
FontFamilyProperty
Identifies the FontFamily property.
Declaration
public static readonly BindableProperty FontFamilyProperty
Field Value
BindableProperty
FontSizeProperty
Identifies the FontSize property.
Declaration
public static readonly BindableProperty FontSizeProperty
Field Value
BindableProperty
HighlightTextColorProperty
Identifies the HighlightTextColor property.
Declaration
public static readonly BindableProperty HighlightTextColorProperty
Field Value
BindableProperty
HorizontalTextAlignmentProperty
Identifies the HorizontalTextAlignment property.
Declaration
public static readonly BindableProperty HorizontalTextAlignmentProperty
Field Value
BindableProperty
IsBusyProperty
Identifies the IsBusy property.
Declaration
public static readonly BindableProperty IsBusyProperty
Field Value
BindableProperty
IsDocumentLoadedProperty
Identifies the IsDocumentLoaded property.
Declaration
public static readonly BindableProperty IsDocumentLoadedProperty
Field Value
BindableProperty
IsHyperlinkSelectedProperty
Identifies the IsHyperlinkSelected property.
Declaration
public static readonly BindableProperty IsHyperlinkSelectedProperty
Field Value
BindableProperty
IsImageSelectedProperty
Identifies the IsImageSelected property.
Declaration
public static readonly BindableProperty IsImageSelectedProperty
Field Value
BindableProperty
IsReadOnlyProperty
Identifies the IsReadOnly property.
Declaration
public static readonly BindableProperty IsReadOnlyProperty
Field Value
BindableProperty
ListTypeProperty
Identifies the ListType property.
Declaration
public static readonly BindableProperty ListTypeProperty
Field Value
BindableProperty
SelectionRangeProperty
Identifies the SelectionRange property.
Declaration
public static readonly BindableProperty SelectionRangeProperty
Field Value
BindableProperty
SourceProperty
Identifies the Source property.
Declaration
public static readonly BindableProperty SourceProperty
Field Value
BindableProperty
TextColorProperty
Identifies the TextColor property.
Declaration
public static readonly BindableProperty TextColorProperty
Field Value
BindableProperty
TextDecorationsProperty
Identifies the TextDecorations property.
Declaration
public static readonly BindableProperty TextDecorationsProperty
Field Value
BindableProperty
TextFormattingProperty
Identifies the TextFormatting property.
Declaration
public static readonly BindableProperty TextFormattingProperty
Field Value
BindableProperty
Properties
AlignCenterCommand
Gets a command to apply center text alignment in the RadRichTextEditor.
AlignJustifyCommand
Gets a command to apply justify text alignment in the RadRichTextEditor.
AlignLeftCommand
Gets a command to apply left text alignment in the RadRichTextEditor.
AlignRightCommand
Gets a command to apply right text alignment in the RadRichTextEditor.
ApplyHyperlinkCommand
Gets a command to apply a hyperlink in the RadRichTextEditor. The command takes a single paramerer of type RichTextHyperlink.
Declaration
public ICommand ApplyHyperlinkCommand { get; }
Property Value
AutoGenerateContextMenu
Gets or sets a value indicating whether to auto-generate the RichTextEditorContextMenuItemBase items for the context menu for this RadRichTextEditor.
BackgroundColor
Gets or sets the background color of the RadRichTextEditor.
Declaration
public Color BackgroundColor { get; set; }
Property Value
Color
BorderColor
Gets or sets the border color of the RadRichTextEditor.
Declaration
public Color BorderColor { get; set; }
Property Value
Color
BorderThickness
Gets or sets the border thickness of the RadRichTextEditor.
Declaration
public Thickness BorderThickness { get; set; }
Property Value
Thickness
BusyIndicatorContent
Gets the content to show when the RadRichTextEditor is performing a long-running operation.
Declaration
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
public DataTemplate BusyIndicatorTemplate { get; set; }
Property Value
DataTemplate
ClearFormattingCommand
Gets a command to clear the formatting of the text in the RadRichTextEditor.
Declaration
public ICommand ClearFormattingCommand { get; }
Property Value
ContextMenuItems
Gets the collection of RichTextEditorContextMenuItemBases used to generate the items of the RadRichTextEditor context menu.
Declaration
public IList<RichTextEditorContextMenuItemBase> ContextMenuItems { get; }
Property Value
CopyCommand
Gets a command to copy the selected HTML in the RadRichTextEditor to the clipboard.
CornerRadius
Gets or sets the corner radius of the RadRichTextEditor.
Declaration
public Thickness CornerRadius { get; set; }
Property Value
Thickness
CutCommand
Gets a command to cut the selected HTML in the RadRichTextEditor to the clipboard.
FontAttributes
Gets or sets the RichTextFontAttributes of the text in the RadRichTextEditor at the current position or selection.
Declaration
public RichTextFontAttributes FontAttributes { get; set; }
Property Value
FontFamily
Gets or sets the font family of the text in the RadRichTextEditor at the current position or selection.
FontSize
Gets or sets the font size of the text in the RadRichTextEditor at the current position or selection.
Declaration
public RichTextUnit FontSize { get; set; }
Property Value
HighlightTextColor
Gets or sets the highlight Color of the text in the RadRichTextEditor at the current position or selection.
Declaration
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
public RichTextHorizontalAlignment HorizontalTextAlignment { get; set; }
Property Value
IndentCommand
Gets a command to indent the text in the RadRichTextEditor.
InsertImageCommand
Gets a command to insert an image in the RadRichTextEditor. The command takes a single paramerer of type RichTextImage.
IsBusy
Gets a value indicating whether the RadRichTextEditor is performing a long-running operation.
IsDocumentLoaded
Gets a value indicating whether a document is currently loaded in the RadRichTextEditor.
IsHyperlinkSelected
Gets a value indicating whether a hyperlink is currently selected in the RadRichTextEditor.
IsImageSelected
Gets a value indicating whether an image is currently selected in the RadRichTextEditor.
IsReadOnly
Gets or sets a value indicating whether the RadRichTextEditor is in a read-only mode.
ListType
Gets or sets the RichTextListType of the text in the RadRichTextEditor at the current position or selection.
Declaration
public RichTextListType ListType { get; set; }
Property Value
OpenHyperlinkCommand
Gets a command to open a hyperlink in the RadRichTextEditor.
OutdentCommand
Gets a command to outdent the text in the RadRichTextEditor.
PasteCommand
Gets a command to paste from the clipboard to the RadRichTextEditor. The command takes a single paramerer of type RichTextPasteType.
RedoCommand
Gets a command to redo the last changes in the RadRichTextEditor.
RemoveHyperlinkCommand
Gets a command to remove a hyperlink in the RadRichTextEditor.
Declaration
public ICommand RemoveHyperlinkCommand { get; }
Property Value
RemoveImageCommand
Gets a command to remove an image in the RadRichTextEditor.
SelectAllCommand
Gets a command to select all in the RadRichTextEditor.
SelectionRange
Gets or sets the selection range of the text in the RadRichTextEditor.
Declaration
public RichTextSelectionRange SelectionRange { get; set; }
Property Value
Source
Gets or sets a RichTextSource providing a rich text to the RadRichTextEditor.
Declaration
public RichTextSource Source { get; set; }
Property Value
TextColor
Gets or sets the Color of the text in the RadRichTextEditor at the current position or selection.
Declaration
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
public RichTextDecorations TextDecorations { get; set; }
Property Value
TextFormatting
Gets or sets the RichTextFormatting of the text in the RadRichTextEditor at the current position or selection.
Declaration
public RichTextFormatting TextFormatting { get; set; }
Property Value
ToggleBoldCommand
Gets a command to toggle the bold text style in the RadRichTextEditor.
ToggleBulletingCommand
Gets a command to toggle the bullets paragraph style in the RadRichTextEditor.
Declaration
public ICommand ToggleBulletingCommand { get; }
Property Value
ToggleItalicCommand
Gets a command to toggle the italic text style in the RadRichTextEditor.
ToggleNumberingCommand
Gets a command to toggle the numbering paragraph style in the RadRichTextEditor.
Declaration
public ICommand ToggleNumberingCommand { get; }
Property Value
ToggleStrikethroughCommand
Gets a command to toggle the strike-through text style in the RadRichTextEditor.
Declaration
public ICommand ToggleStrikethroughCommand { get; }
Property Value
ToggleSubscriptCommand
Gets a command to toggle the subscript text style in the RadRichTextEditor.
Declaration
public ICommand ToggleSubscriptCommand { get; }
Property Value
ToggleSuperscriptCommand
Gets a command to toggle the superscript text style in the RadRichTextEditor.
Declaration
public ICommand ToggleSuperscriptCommand { get; }
Property Value
ToggleUnderlineCommand
Gets a command to toggle the underline text style in the RadRichTextEditor.
Declaration
public ICommand ToggleUnderlineCommand { get; }
Property Value
UndoCommand
Gets a command to undo the last changes in the RadRichTextEditor.
Methods
GetHtmlAsync()
Gets asynchronously the currently edited content of the RadRichTextEditor as HTML.
GetHyperlinkAsync()
Gets asynchronously the hyperlink under the caret in the RadRichTextEditor.
Declaration
public Task<RichTextHyperlink> GetHyperlinkAsync()
Returns
An instance of the RichTextHyperlink class or null, if there is no hyperlink.
GetImageAsync()
Gets asynchronously the currently selected image in the RadRichTextEditor.
Declaration
public Task<RichTextImage> GetImageAsync()
Returns
An instance of the RichTextImage class or null, if there is no image.
GetSelectionAsync()
Gets asynchronously the current text selection in the RadRichTextEditor.
Declaration
public Task<RichTextSelection> GetSelectionAsync()
Returns
An instance of the RichTextSelection class or null, if there is no text selection.
OnPropertyChanged(string)
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
propertyName
Events
FontAttributesChanged
Raised when the FontAttributes property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<RichTextFontAttributes>> FontAttributesChanged
Event Value
FontFamilyChanged
Raised when the FontFamily property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<string>> FontFamilyChanged
Event Value
FontSizeChanged
Raised when the FontSize property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<RichTextUnit>> FontSizeChanged
Event Value
HighlightTextColorChanged
Raised when the HighlightTextColor property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<Color>> HighlightTextColorChanged
Event Value
EventHandler<ValueChangedEventArgs<Color>>
HorizontalTextAlignmentChanged
Raised when the HorizontalTextAlignment property of the RadRichTextEditor has changed.
Declaration
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
public event EventHandler<InsertImageErrorEventArgs> InsertImageError
Event Value
IsHyperlinkSelectedChanged
Raised when the IsHyperlinkSelected property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<bool>> IsHyperlinkSelectedChanged
Event Value
IsImageSelectedChanged
Raised when the IsImageSelected property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<bool>> IsImageSelectedChanged
Event Value
IsReadOnlyChanged
Raised when the IsReadOnly property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<bool>> IsReadOnlyChanged
Event Value
ListTypeChanged
Raised when the ListType property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<RichTextListType>> ListTypeChanged
Event Value
OpenHyperlinkError
Raised when an error occurs when openning a hyperlink in the RadRichTextEditor.
Declaration
public event EventHandler<OpenHyperlinkErrorEventArgs> OpenHyperlinkError
Event Value
PickImage
Raised when the user has requested to pick an image in the RadRichTextEditor.
Declaration
public event EventHandler<PickImageEventArgs> PickImage
Event Value
SelectionRangeChanged
Raised when the SelectionRange property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<RichTextSelectionRange>> SelectionRangeChanged
Event Value
TextColorChanged
Raised when the TextColor property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<Color>> TextColorChanged
Event Value
EventHandler<ValueChangedEventArgs<Color>>
TextDecorationsChanged
Raised when the TextDecorations property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<RichTextDecorations>> TextDecorationsChanged
Event Value
TextFormattingChanged
Raised when the TextFormatting property of the RadRichTextEditor has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<RichTextFormatting>> TextFormattingChanged
Event Value