# docx-editor-auto-save

> Document editor that automatically saves document changes through a configurable server endpoint.

**Framework:** aspnet-core  **Component:** DocxEditor  **Variant:** auto-save

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/aspnet-core/docx-editor-auto-save.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.AspNetCore.DocumentEditor
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/docx-editor-auto-save/docx-editor.cshtml

```cshtml
@page
@namespace aspnet_core.DocxEditor.AutoSave
@using Syncfusion.EJ2

    <div class="control-section">
        <div id='documenteditor_titlebar' class="e-de-ctn-title"></div>
        <ejs-documenteditorcontainer id="container" height="590px" enableToolbar="true" enableAutoSave="true" autoSaveInterval="15000"></ejs-documenteditorcontainer>
    </div>

    <script>
        // Configure the auto-save log panel so the user can see when each
        // save happened. The actual save endpoint is stubbed in this sample.
        document.addEventListener('DOMContentLoaded', function () {
            var container = document.getElementById('container').ej2_instances[0];
            if (!container) return;
            var changed = false;
            container.documentEditor.contentChange = function () { changed = true; };
            setInterval(function () {
                if (!changed) return;
                var span = document.createElement('span');
                var date = new Date();
                span.innerHTML = 'Auto saved at <b>' + date.toLocaleTimeString() + '</b><hr>';
                // For brevity, just log to the console. A full implementation
                // would POST the document to a server endpoint here.
                console.log('Auto saved at', date.toISOString());
                changed = false;
            }, 15000);
        });
    </script>

```
