Author Aide API Events
save:before
Fires before a save operation begins in the Author Aide API.
You would want to be notified about this event firing, because you might want to perform validation or preparation tasks before the save operation proceeds.
Examples
authorAideApp.on('save:before', function (event) {
console.log('This code executes before a save operation begins.');
console.log('Item reference(s):', event.itemReference);
console.log('Current path:', event.currentPath);
console.log('Save mode:', event.mode);
});
Callback arguments
-
itemReference string array[string]
The reference of the Item being saved.
An array of Item references for bulk save operations.
-
currentPath string
The current path where save was initiated.
-
mode string
The save mode indicating the type of operation being performed.
Possible values
"generate"Content generation operation"translate"Translation operation"edit"Manual editing operation"bulk"Bulk operation on multiple Items