TeamLab Document Editors API Documentation

config > events

var docEditor = new DocsAPI.DocEditor('placeholder', {
   events: {
      'onReady': onDocEditorReady,
      'onDocumentStateChange': onDocumentStateChange,
      'onRequestEditRights': onRequestEditRights,
      'onSave': onDocumentSave,
      'onError': onError,
      'onBack': onBack
   }
});

Two events have additional importance and should be viewed separately:

var docEditor = new DocsAPI.DocEditor('placeholder', {
   events: {
      'onSave': onDocumentSave
   }
});

function onDocumentSave(event) {
    var url = event.data;
}
var docEditor = new DocsAPI.DocEditor('placeholder', {
   events: {
      'onError': onError
   }
});

function onError(event) {
   var docEditorShowError = function (message, title) {
      ASC.Files.Editor.docEditor.showError(title || "The Error Title", "The error text which is to be displayed in the error window.");
   };

   var docEditorShowMessage = function (message, title) {
      ASC.Files.Editor.docEditor.showMessage(title || "The Message Title", "The message text which is to be displayed in the message window.");
   };
}
Please see other sections for more options: