upload #

Type: String, Boolean

Default: false

By default, images upload are disabled in the editor. To enable it, specify the path to the server-side uploader, like this:

Revolvapp('#myemail', {
    image: {
        upload: '/image-uploader/'
    }
});

When uploading an image, Revolvapp sends a POST request to the specified path on the server. File is sent as a single file and by default has the key file. For example, in PHP, this is the array $ _FILES ['file'].

Here is an example of JSON object which should be return as a response of upload:

{
    "url": "image-url-1.jpg",
    "id": "some-id"
}

See more how the image upload works.

url #

Type: Boolean

Default: true

This setting turns on/off the feature of inserting an image via a direct url. By default is enable. The example below shows how to disable the direct url option.

Revolvapp('#myemail', {
    image: {
        url: false
    }
});

name #

Type: String

Default: file

By default, the key of the file array sent to the server is file. This can be changed like this:

Revolvapp('#myemail', {
    image: {
        upload: '/image-uploader/',
        name: 'image'
    }
});

In this example, imageUpload variable name will be image and it can be retrieved like this (in PHP):

$_FILES['image']