Additional upload data

This example shows how to send additional POST params with uploading.

Code

<!DOCTYPE html>
<html>
<head>
    <title>Redactor X</title>
    <meta charset="utf-8">

    <!-- css -->
    <link rel="stylesheet" href="/your-dist-path/redactorx.min.css" />
</head>
<body>
    <!-- element -->
    <textarea id="entry">
        <p>Content</p>
    </textarea>

    <!-- data from inputs -->
    <input type="hidden" id="my-input-1" value="my-input-value-1">
    <input type="hidden" id="my-input-2" value="my-input-value-2">

    <!-- js -->
    <script src="/your-dist-path/redactorx.min.js"></script>

    <!-- call -->
    <script>
    RedactorX('#entry', {
        image: {
            upload: '/image-uploader-path/',
            data: {
                id: 10,
                elements: '#my-input-1, #my-input-2'
            }
        }
    });
    </script>
</body>
</html>