Documentation
Control
close
Hide the shown control.
this.app.control.close();
add
name | String | |
button | Object |
Add a button to the control.
(function() {
Revolvapp.add('plugin', 'myplugin', {
start: function() {
this.app.control.add('mybutton', {
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 in the control bar 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.
get
name | String |
Get the specified button from the control.
var $button = this.app.control.get('duplicate');
dkjgvo65776inru43654