Set up styles inside template

This example shows how to set the template content styles directly in the template itself.

Code

<!DOCTYPE html>
<html>
    <head>
        <title>Revolvapp</title>
        <meta charset="utf-8">

        <!-- css -->
        <link rel="stylesheet" href="/your-folder/revolvapp.css" />
    </head>
    <body>
        <!-- element -->
        <div id="myemail"></div>

        <!-- js -->
        <script src="/your-folder/revolvapp.js"></script>

        <!-- call -->
        <script>
        Revolvapp('#myemail', {
            editor: {
                path: '/your-path-to-revolvapp-folder/',
                template: '/your-path-to-template-file.html'
            },
            image: {
                upload: '/my-backend-upload/'
            }
        });
        </script>
    </body>
</html>

Usage

Revolvapp has the ability to store template style settings right inside the template. This can be done by placing the re-options tag inside the template. For example, like this:

<re-html>
    <re-options>
    {
        "text": {
            "font-family": "Helvetica, Arial, sans-serif",
            "font-size": "21px",
            "line-height": "1.5",
            "color": "#333"
        },
        "heading": {
            "font-family": "Helvetica, Arial, sans-serif",
            "font-weight": "bold",
            "color": "#111"
        }
    }
    </re-options>
    <re-head>...</re-head>
    <re-body>...</re-body>
</re-html>

Now, if you save the template and display it in Revolvapp afterwards, it is these style settings that will be set in the settings.

Also see the styles setting to see what styles can be in the template.