[Solved] @onblur Event

Greetings,
I'm trying to capture the onblur event on the RichTextEditor as follows:
< SfRichTextEditor @onblur="Func"

But onload the component gives me this error:
 Error: System.InvalidOperationException: Object of type 'Syncfusion.Blazor.RichTextEditor.SfRichTextEditor' does not have a property matching the name 'onblur'.

I've tried wrapping it in a div as mentioned in another post about Keyboard args, but it doesn't work.

How do I capture this event?

Thank you


3 Replies

IS Indrajith Srinivasan Syncfusion Team May 11, 2020 11:50 AM UTC

Hi Azeo, 
 
Greetings from Syncfusion support,

We have validated your reported query. We have Blur event in Rich Text Editor to capture the editor blur action. You can configure the events in the RichTextEditorEvents tag to achieve it. Since there is no event name matching onblur, the error occurs. Below is the code block for configuring the Blur event with Rich Text Editor.
 
 
 
@using Syncfusion.Blazor.RichTextEditor 
 
<SfRichTextEditor> 
    <RichTextEditorEvents Blur="@OnBlur"></RichTextEditorEvents> 
    <p>Rich Text Editor allows to insert images from online source as well as local computer where you want to insert the image in your content.</p> 
    <p><b>Get started Quick Toolbar to click on the image</b></p> 
    <p>It is possible to add custom style on the selected image inside the Rich Text Editor through quick toolbar.</p> 
</SfRichTextEditor> 
 
@code { 
    private void OnBlur() 
    { 
        System.Diagnostics.Debug.WriteLine("Blur called"); 
    } 
} 
 
Indrajith 



AZ Azeo May 11, 2020 04:29 PM UTC

Thank you Indrajith!


IS Indrajith Srinivasan Syncfusion Team May 12, 2020 03:47 AM UTC

Hi Azeo,

Thanks for the update,

We are glad that the reported issue is resolved. Please let us know if you need any further assistance.

Regards, 
Indrajith 


Loader.
Up arrow icon