Skip to content

Example of Auto Save in ASP.NET MVC Rich Text Editor Control

This sample demonstrates how to save the Rich Text Editor's content automatically with periodic interval. When you type or edit the content, it will be saved automatically every 5 seconds.

Properties

The Rich Text Editor provides options to save its content automatically using the SaveInterval property. By default, the save interval time is 10 seconds from built-in support, but it can be customized as per the application needs. The interval is calculated based on editing the content and is not considered on an idle state.

We have configured the save interval as 5 seconds in this example. You can save the content on the server also using this ‘auto save’ option.

When you disable the ‘Auto Save’ option in the sample, the value will be saved on focus-out from the editor.

EnablePersistence keeps the text in the browser each time it is saved, so the editor starts from it when the page is opened again (it is made safe when it is read back).