Author API Methods
save()
Saves the current Item being edited.
You would want to use this method so that you can programmatically save the Item being edited with your own save button in your application, for example.
Note This method can only be called on the Item edit or Widget edit views.
Examples
// Save the current Item
authorApp.save();
// Save the current Item and stay on the same view
authorApp.save({ navigate: false });
Arguments
-
saveOptions object
Options for customizing the behavior of the
save()
method.-
navigate boolean
This controls what happens after the Item is saved successfully when the
save()
method is called on Widget edit view.If
true
or no value is passed, the view will return to the Item edit view. Iffalse
, it remains on the same view.Default:
true
-
Return value
Type boolean
Returns true
if the save operation was successful.
Returns false
if unable to save the Item. For example, when not currently in the Item edit view or Widget edit view, there were no changes to save for the Item, or Item is empty.
Caveats
The Item will not be saved to the Item bank if save.persist
initialization option is false
.