Variable

Create and use variables as non-editable things in the content.

    Demo

    Code

    <!DOCTYPE html>
    <html>
        <head>
            <title>Redactor</title>
            <meta charset="utf-8">
    
            <!-- redactor css -->
            <link rel="stylesheet" href="/your-folder/redactor.css" />
    
            <!-- plugin css -->
            <link rel="stylesheet" href="/your-folder/plugins/variable.css" />
        </head>
        <body>
            <!-- element -->
            <textarea id="content">...</textarea>
    
            <!-- redactor js -->
            <script src="/your-folder/redactor.js"></script>
    
            <!-- plugin js -->
            <script src="/your-folder/plugins/variable.js"></script>
    
            <!-- call -->
            <script>
            $R('#content', {
                plugins: ['variable'],
                variables: ['username', 'email', 'password', 'name', 'lastname', 'country']
            });
            </script>
        </body>
    </html>