Current editor state including images, stickers, text, drawings etc can be saved in json format for later use. This is useful for allowing user to pick from pre-made designs, backing up user progress, auto saving and more.
Getting editor state
var pixie = new Pixie({
onLoad: function() {
var state = pixie.getState();
//state is a json string of current editor state
}
});
Sending editor state to server
Note that this is just an example for saving editor state to server using pixie's http client. You can also save the state to browser's local storage, only store it locally, use your own http client or save it any other way you need.
var pixie = new Pixie({
onLoad: function() {
var state = pixie.getState();
pixie.http().post('http://your-site.url.com', {state: state});
}
});