getStates

Checks which images have been removed from the content.

var changes = this.app.image.getStates();
for (var key in changes) {
    if (changes[key].status === false) {
        // image was deleted
    }
    else {
        // image is still in the content
    }
}

insert

Arguments
image Object

Inserts an image to content.

var image = {
    'my-image': {
        url: 'my-image.jpg'
    }
};

// insert
this.app.image.insert(image);

Inserts multiple images to content.

var image = {
    'my-image-1': {
        url: 'my-image-1.jpg'
    },
    'my-image-2': {
        url: 'my-image-2.jpg'
    }
};

// insert
this.app.image.insert(image);

change

Arguments
image Object

Changes the url of the selected image.

var image = {
    'my-image': {
        url: 'my-new-image.jpg'
    }
};

// change
this.app.image.change(image);