Migrating from Xamarin RichTextEditor to .NET MAUI RichTextEditor
9 Sep 20256 minutes to read
To migrate easily from Xamarin SfRichTextEditor to .NET MAUI SfRichTextEditor, we kept all the APIs from Xamarin SfRichTextEditor in MAUI SfRichTextEditor. However, to maintain the consistency of API naming in MAUI https://help.syncfusion.com/cr/maui/Syncfusion.Maui.RichTextEditor.html, we renamed some of the APIs. The APIs that have been changed in MAUI SfRichTextEditor from Xamarin SfRichTextEditor are detailed as follows.
Namespaces
| Xamarin SfRichTextEditor |
.NET MAUI SfRichTextEditor |
| Syncfusion.RichTextEditor.XForms |
Syncfusion.Maui.RichTextEditor |
Properties
| Xamarin SfRichTextEditor |
.NET MAUI SfRichTextEditor |
Description |
|
AutoSize
|
EnableAutoSize |
Gets or sets a value indicating whether the editor should automatically resize based on its content. |
|
BackgroundColor
|
EditorBackgroundColor |
Gets or sets the background color of the editor's content area. |
|
DefaultFont
|
DefaultFontFamily |
Gets or sets the default font family. |
|
DefaultFontColor
|
DefaultTextColor |
Gets or sets the default text color. |
|
PlaceHolder
|
Placeholder |
Gets or sets the placeholder text that is displayed when the editor is empty. |
|
PlaceHolderFontColor
|
PlaceholderColor |
Gets or sets the value for place holder font color. |
|
PlaceHolderFontFamily
|
PlaceholderFontFamily |
Gets or sets the value for place holder font family. |
|
PlaceHolderFontSize
|
PlaceholderFontSize |
Gets or sets the value for place holder font size. |
|
WordWrap
|
EnableWordWrap |
Gets or sets the word-wrap that allows long words to be able to be broken and wrap onto the next line. |
Events
| Xamarin SfRichTextEditor |
.NET MAUI SfRichTextEditor |
Description |
|
ImageInserted
|
ImageRequested |
Occurs when an image is about to be inserted, allowing for customization of the image source. |
|
HyperlinkSelected
|
HyperlinkClicked |
Occurs when a hyperlink is tapped, allowing for custom actions to be performed. |
Methods
Limitations
-
Nested ScrollView: RichTextEditor scroll behavior is incompatible with parent ScrollView containers and will be automatically disabled.
-
AutoSize Configuration: To prevent off-screen rendering when AutoSize is enabled, configure the MaximumHeightRequest property to constrain the control within viewport boundaries.
-
Keyboard Interaction: Toolbar visibility is affected when MaximumHeightRequest extends into the on-screen keyboard area, causing automatic hiding.
-
Supported Content Types: Editor content is restricted to plain text and HTML markup formats only.