Documentation

Overview

To access the Revolvapp's API from external scripts, you need to get an instance of the running editor.

This can be done by defining a variable at startup or after starting the editor by accessing the element by ID:

var app = Revolvapp('#myemail');
app.editor.setTemplate('template code');

Plugins API

Inside the plugins, you can access to the editor modules API by using this.app.

(function() {
    Revolvapp.add('plugin', 'myplugin', {
        start: function() {
            this.app.toolbar.add('mybutton', {
                title: 'My Button',
                icon: '<i class="fa fa-file-alt"></i>',
                command: 'myplugin.show'
            });
        },
        show: function() {
            var html = this.app.editor.getHtml();
            console.log(html);
        }
    });
})(Revolvapp);