Get template code

This example shows how to get the template code using API.

    Click the button and you can see the template code in your browser's console.

    Code

    <!DOCTYPE html>
    <html>
        <head>
            <title>Revolvapp</title>
            <meta charset="utf-8">
    
            <!-- css -->
            <link rel="stylesheet" href="/your-folder/revolvapp.css" />
        </head>
        <body>
            <!-- button -->
            <button onclick="getTemplate()">Get template</button>
    
            <!-- element -->
            <div id="myemail"></div>
    
            <!-- js -->
            <script src="/your-folder/revolvapp.js"></script>
    
            <!-- call -->
            <script>
            var app = Revolvapp('#myemail', {
                editor: {
                    path: '/your-path-to-revolvapp-folder/',
                    template: '/your-path-to-template-file.html'
                },
                image: {
                    upload: '/my-backend-upload/'
                }
            });
    
            // call API method
            function getTemplate() {
                console.log(app.editor.getTemplate());
            }
            </script>
        </body>
    </html>