Examples

Upload or drag files

    This example shows how to set up Redactor for uploading or drag and drop files.

    Demo

    Code

    <!--element -->
    <textarea id="content"></textarea>
    
    <!-- call -->
    <script>
    $R('#content', { fileUpload: '/your-upload-script/' });
    </script>
    
    <!-- server response json -->
    {
        "file": {
            "url": "some-file-url",
            "name": "some-file-name",
            "id": "some-id"
        }
    }