Documentation

Toolbar

get

Arguments
name String

Gets the specified button from the toolbar.

var $button = this.app.toolbar.get('tune');

add

Arguments
name String
button Object

Adds a button to the toolbar.

(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.toggle'
            });
        },
        toggle: function(args) {
            // do something
        }
    });
})(Revolvapp);

In this example, Font Awesome is used for the button icon. You can add your own HTML and SVG icon.

Now call the editor with the plugin created:

Revolvapp('#myemail', {
    plugins: ['myplugin']
});

The button should appear on the toolbar when you click on any block and when it pressed, will call the plugin's toggle method.

See more about the parameters of the buttons.

remove

Arguments
name String

Removes the specified button from the toolbar.

this.app.toolbar.remove('tune');

disableButtons

Arguments
except (optional) Array

Disables buttons on the toolbar except specified buttons.

this.app.toolbar.disableButtons(['mybutton']);

enableButtons

Enables all button on the toolbar.

this.app.toolbar.enableButtons();