image.change #

Arguments
response ObjectThe response object with data of the uploaded image

Occurs whenever an image in the editor is replaced with a new one.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'image.change': function(event) {
            ...
        }
    }
});

image.remove #

Arguments
url StringAddress path of the image.
id Stringdata-image attribute of the image.

Occurs whenever an image removed.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'image.remove': function(event) {
            ...
        }
    }
});

image.upload.error #

Arguments
response ObjectJSON object with error data

Occurs when the image upload fails.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'image.upload.error': function(event) {
            ...
        }
    }
});

Here is the example of JSON error response:

{
    "error": true,
    "message": "Something went wrong..."
}