Previously saved editor state can be easily loaded back into the editor allowing for implementing various functionality, like backing up user work, letting user pick from a set of predefined designs, autosave and so on.
var state; //previously saved editor state
var pixie = new Pixie({
onLoad: function() {
pixie.setState(state).then(function() {
//state has been loaded
});
}
});
Note that this is just an example for getting editor state from the server using pixie's http client. You can also get it from browser's local storage, your own app, or any other way you might need.
var pixie = new Pixie({
onLoad: function() {
pixie.setStateFromUrl('https://your-site.com/state.json').then(function() {
//state has been loaded
});
}
});