Global settings

If you have some Article Editors 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 ArticleEditor.settings object before the initialization.

    Demo


    Code

    <!DOCTYPE html>
    <html>
    <head>
        <title>Article Editor</title>
        <meta charset="utf-8">
    
        <!-- css -->
        <link rel="stylesheet" href="/your-article-dist-path/article-editor.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-article-dist-path/article-editor.min.js"></script>
    
        <!-- global settings -->
        <script>
        ArticleEditor.settings = {
            source: false,
            css: '/your-article-dist-path/'
        };
        </script>
    
    
        <!-- call -->
        <script>
        // first
        ArticleEditor('#entry-1', {
            editor: {
                focus: true
            }
        });
    
         // second
        ArticleEditor('#entry-2', {
            editor: {
                direction: 'rtl'
            }
        });
        </script>
    </body>
    </html>