itemduplicate.confirm - Events - Author API

Author API Events

itemduplicate:confirm

Fires after an author has confirmed the duplication of an Item containing a shared passage.

You would want to be notified about this event firing, because you might want to make a copy of the shared passage before the author confirms the duplication of the Item, for example.

When duplicating an Item, a confirmation dialog is displayed when a shared passage is present in the Item, giving the author a choice of duplicating the Item or cancelling the action.

Examples

authorApp.on('itemduplicate:confirm', function (itemJson) {
    console.log('This code executes when the author has confirmed the duplication of an Item containing a shared passage.');
    console.log(itemJson);
});

Callback arguments

  • itemJson object

    JSON of the Item being duplicated.

Related articles

  • The duplicateItem() method, which duplicates the current Item being edited.
Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.