Autosave RTE in Blazor server

Hi

I need to implement autosave in rte, could you help me with some example?

Currently I have to do it through a button to save the information, but I would like this to be automatic, let's say every 15 seconds I can call that button and from there I call my endpoint to save the data on the server.

3 Replies 1 reply marked as answer

IS Indrajith Srinivasan Syncfusion Team December 30, 2020 08:38 AM UTC

Hi Jose,  
 
Greetings from Syncfusion support, 
 
Query : “I need to implement autosave in rte, could you help me with some example?” 
 
We have validated your reported query. Yes, you can autosave the values in the Rich Text Editor by configuring the AutoSaveOnIdle and SaveInterval property. Based on the time interval specified, for the SaveInterval property the ValueChange event will be triggered. Check the below sample for reference 
 
Index.razor 
 
 
@using Syncfusion.Blazor.RichTextEditor 
 
<SfRichTextEditor @ref="RteObj" AutoSaveOnIdle="true" SaveInterval=15000> 
    <RichTextEditorEvents ValueChange="@onChanged"></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 { 
    SfRichTextEditor RteObj; 
    public void onChanged() 
    { 
        System.Diagnostics.Debug.WriteLine(this.RteObj.Value); 
    } 
} 
 
 
 
Please let us know if the solution helps, 
 
Regards, 
Indrajith 


Marked as answer

JL jose luis barajas December 30, 2020 09:45 PM UTC

Hi

Thanks... I put your code and works fine!



IS Indrajith Srinivasan Syncfusion Team December 31, 2020 04:21 AM UTC

Hi Jose,

Thanks for the update,

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

Regards,
Indrajith

Loader.
Up arrow icon