Autosave content

This example shows how to save the content with each change automatically.

Code

<!--element -->
<textarea id="content"></textarea>

<!-- call -->
<script>
$R('#content', {
    autosave: '/your-autosave-server-script/',
    callbacks: {
        autosave: function(name, data, response)
        {
            // name - name of textarea or the value of `autosaveName` option
            // data - an object with the data sent to the server
            // response -  the server JSON response
        }
    }
});
</script>