Scroll target

This example shows how to configure Redactor X if it's inside a scrollable layer.

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 -->
    <div id="target" style="position: relative; overflow: auto; height: 450px;">
        <textarea id="entry">
            <p>Content</p>
        </textarea>
    </div>

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

    <!-- call -->
    <script>
    RedactorX('#entry', {
        editor: {
            scrollTarget: '#target'
        }
    });
    </script>
</body>
</html>