Multiple editors

This example shows how to call Redactor X for multiple textarea elements. Just specify the class or another group selector when you initializing it.


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 1 -->
    <textarea id="entry-1" class="entry">
        <p>Content</p>
    </textarea>

    <!-- element 2 -->
    <textarea id="entry-2" class="entry">
        <p>Content</p>
    </textarea>

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

    <!-- call -->
    <script>
    RedactorX('.entry');

    // get all running editors as an array
    console.log(RedactorX.instances);
    </script>
</body>
</html>