How to handle the FormatChanged event in the SfRichTextEditor
How to handle the FormatChanged event in the SfRichTextEditor
This article explains how to handle format changed events in the Rich Text Editor.
Step 1: Create a SfRichTextEditor sample with all the necessary assemblies. Refer to this Getting started documentation to create a simple SfRichTextEditor sample and configure it.
Step 2: Use the FormatChanged event to track the status of the format in the SfRichTextEditor.
XAML
<rte:SfRichTextEditor FormatChanged="Rte_FormatChanged" x:Name="Rte" Text="Hello World!!!"/>
Step 3: Attach the method for format changed event to track the status of formats.
C#
private void Rte_FormatChanged(object sender, FormatChangedEventArgs e)
{
SfToolbarStatus status = e.Formats;
//is bold applied
var isBold = status.bold;
}
The sample that explains how to track the status of formats using the FormatChanged event in the Rich Text Editor text that can be downloaded here.
If you have any questions or require clarification about this support, please let us know in the following comments section. You can also contact us through our support forum or Direct Trac. We are happy to assist you!