Upload image

This example shows the basic setting for uploading images. See the documentation for more details.

Code

<!-- element -->
<textarea id="entry">...</textarea>

<!-- call -->
<script>
let app = Redactor('#entry', {
    image: {
        upload: '/image-uploader-path/'
    }
});
</script>

Usage

The editor sends a POST request to the specified path to an uploader on the server. The server-side script should generate a JSON as the response, like this:

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