API

getHtml

Arguments
tidy (optional) Boolean

Returns: String

The method returns an email template generated in HTML.

<!-- call api -->
<button onclick="console.log($RE('#myemail', 'getHtml'));">Get HTML</button>

<!-- element -->
<div id="myemail"></div>

<!-- init -->
<script>
$RE('#myemail', {
    path: '/revolvapp-dist/',
    template: '/my-folder/template.html'
});
</script>

If tidy is specified for the method as argument, then HTML is returned to the beautifier view.

console.log($RE('#myemail', 'getHtml', true));

getTemplate

Arguments
tidy (optional) Boolean

Returns: String

The method returns the modified template that contains changes made during visual editing.

<!-- call api -->
<button onclick="console.log($RE('#myemail', 'getTemplate'));">Get Template</button>

<!-- element -->
<div id="myemail"></div>

<!-- init -->
<script>
$RE('#myemail', {
    path: '/revolvapp-dist/',
    template: '/my-folder/template.html'
});
</script>

If tidy is specified for the method as argument, then the template is returned to the beautifier view.

console.log($RE('#myemail', 'getTemplate', true));

getSource

Arguments
tidy (optional) Boolean

Returns: String

The method returns the original template without changes, which was set at initialization.

<!-- call api -->
<button onclick="console.log($RE('#myemail', 'getSource'));">Get Source</button>

<!-- element -->
<div id="myemail"></div>

<!-- init -->
<script>
$RE('#myemail', {
    path: '/revolvapp-dist/',
    template: '/my-folder/template.html'
});
</script>

If tidy is specified for the method as argument, then the template is returned to the beautifier view.

console.log($RE('#myemail', 'getSource', true));

setTemplate

Arguments
template String

The method sets the template in the editor.

<!-- call api -->
<button onclick="console.log($RE('#myemail', 'setTemplate', 'template code'));">Set Template</button>

<!-- element -->
<div id="myemail"></div>

<!-- init -->
<script>
$RE('#myemail', {
    path: '/revolvapp-dist/',
    template: '/my-folder/template.html'
});
</script>