se7enxweb / ezautosave-ls
Content editing autosave extension for Exponential Legacy
Package info
github.com/se7enxweb/ezautosave
Type:ezpublish-legacy-extension
pkg:composer/se7enxweb/ezautosave-ls
Fund package maintenance!
Requires
- se7enxweb/expui: ^1.0.0.1
- se7enxweb/ezpublish-legacy-installer: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- v6.0.15
- v6.0.14
- v6.0.13
- v6.0.12
- v6.0.11
- v6.0.10
- v6.0.9
- v6.0.8
- v6.0.7
- v6.0.6
- v6.0.5
- v6.0.4
- v6.0.3
- v6.0.2
- v6.0.1
- v6.0.0
- 5.4.x-dev
- v5.4.4
- v5.4.3
- v5.4.2
- v5.3.5.1
- v5.3.5.1-rc1
- v5.3.5
- v5.3.5-rc1
- v5.3.1
- v5.3.0
- dev-stable-5.3
- dev-ezp-21517_dashboard_draft
- dev-stable-5.2
- dev-ezp-21005_preview_change_sa_chrome_mac
This package is auto-updated.
Last update: 2026-10-24 02:29:02 UTC
README
Project page: http://projects.ez.no/ezautosave Roadmap feature request: http://share.ez.no/feature-requests/auto-store-draft-feature
eZ Autosave enables the automatic and transparent saving of the draft while editing a content in eZ Publish. Based on this, it also provides an "inline" preview from the content edit in the administration interface.
This extension is based on QH Autosave by Quoc-Huy NGUYEN DINH
Features
- Regularly save the draft (interval defined in
autosave.ini/[AutosaveSettings]/Interval) - Save the draft when the user leaves a form field (enable/disable
through
autosave.ini/[AutosaveSettings]/TrackUserInput) - Hide the "Store draft" button (enable/disable through
autosave.ini/[AutosaveSettings]/HideStoreDraftButton) - Try to save the draft if the editor unexpectedly quits the content edit page (back button, close browser, ...)
Requirements
- eZ Publish 2012.01 or 4.7 or newer
TODO / Known issues
- When timeout is implemented, add a Retry button in case of timeout
- Use the output of the ezjscore action to update the content edit form: for instance, after uploading an image, the preview could be updated or the unvalidated field could be hightlighted.
- Let the editor disable/enable the autosave process
- Let the editor choose the interval between two autosave attempts
Technical notes
The autosave runs on Exponential UI's Exp.autosave.AutoSubmit (exp::autosave,
extension expui). It submits a form at a fixed interval, or when the user has
changed something, to an ezjscore call, and triggers these events:
- init
- beforesave
- success
- error
- abort
The admin's preview pane is Exp.autosave.Preview. The edit templates of this
extension (design/admin and design/ezwebin, content/edit/autosave.tpl) show
both in use. The admin one carries no inline script: it writes its settings as
<script type="application/json" id="ezautosave-settings"> (with < and >
as \u003c and \u003e, so no text can end the block early), and
design/admin/javascript/ezautosave/autosave_admin.js (loaded with defer)
starts the autosave from them, so the edit page runs under a Content Security
Policy without 'unsafe-inline'. A minimal example (inline, for a page without
such a policy):
{exp_config()}
{ezscript_require( array( 'ezjsc::jquery', 'exp::core::shared', 'exp::io', 'exp::autosave' ) )}
<script type="text/javascript">
Exp.ready(function ($) {
var as = new Exp.autosave.AutoSubmit({
form: '#editform',
action: '/ezjscore/call/ezautosave::savedraft::42::3::eng-GB?ContentType=javascript',
interval: 60,
trackUserInput: true
});
as.on('success', function (e) { console.log(e.json.content.message_success); });
as.start();
});
</script>