- sandbox.publish('savingEnded', 'success', 'remote', data.version);
- document_version = data.version;
+ sandbox.publish('savingEnded', 'success', 'remote', data);
+
+ Object.keys(data)
+ .filter(function(key) {
+ return key !== 'text';
+ })
+ .forEach(function(key) {
+ wlxmlDocument.setProperty(key, data[key]);
+ });
+