Initialization Option Author API

mode

Start Author API in one of the four main user interface views for managing Items and Activities.

You would want to use this to load a specific view in the user interface to customize the authoring experience.

Examples

// Start Author API in the Activity list view
var initializationOptions = {
    "mode": "activity_list"
};

// Start Author API in the Item list view
var initializationOptions = {
    "mode": "item_list"
};

// Start Author API in the Activity editor view with a new Activity
var initializationOptions = {
    "mode": "activity_edit"
};

// Start Author API in the Activity editor view with an existing Activity
var initializationOptions = {
    "mode": "activity_edit",
    "reference": "my_existing_activity_reference",
};

// Start Author API in the Item editor view with an existing Item
var initializationOptions = {
    "mode": "item_edit",
    "reference": "my_existing_item_reference",
};

Values

Request object key mode

Type string

Possible values:
  • "activity_list"

    View which shows all Activities.

  • "item_list"

    View which shows all Items.

  • "activity_edit"

    Starts Author API in the Activity editor view with a new Activity ready for changes. An existing Activity reference can be set in the reference initialization option to load it for editing immediately.

  • "item_edit"

    Starts Author API in the Item editor view. This mode requires an existing or new Item reference to be set in the reference initialization option.

Caveats

The Author API interface does not include elements that allow authors to switch between the Item list or Activity list modes (views). It is recommended to build separate pages or elements within your application that will initialize Author API in the Item list or Activity list views.

Related articles

this is a mandatory property.

Was this article helpful?