Global settings

If you have some Redactors X are running on the page, sometimes in addition to the specific options for each one, you need to set global settings for all editors at once. It can be done with the RedactorX.settings object before the initialization.

    Demo


    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>
    
        <!-- global settings -->
        <script>
        RedactorX.settings = {
            source: false
        };
        </script>
    
    
        <!-- call -->
        <script>
        // first
        RedactorX('#entry-1', {
            editor: {
                focus: true
            }
        });
    
         // second
        RedactorX('#entry-2', {
            editor: {
                direction: 'rtl'
            }
        });
        </script>
    </body>
    </html>