mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 11:26:04 +01:00
Allow adding a class to editor buttons
This commit is contained in:
@@ -230,8 +230,9 @@
|
||||
if (!$this.buttons[button]) return;
|
||||
|
||||
var title = $this.buttons[button].title ? $this.buttons[button].title : button;
|
||||
var buttonClass = $this.buttons[button].class ? 'class="' + $this.buttons[button].class + '"' : '';
|
||||
|
||||
bar.push('<li><a data-mdeditor-button="'+button+'" title="'+title+'" data-uk-tooltip>'+$this.buttons[button].label+'</a></li>');
|
||||
bar.push('<li><a data-mdeditor-button="'+button+'" title="'+title+'" '+buttonClass+' data-uk-tooltip>'+$this.buttons[button].label+'</a></li>');
|
||||
});
|
||||
|
||||
this.toolbar.html(bar.join('\n'));
|
||||
|
||||
Reference in New Issue
Block a user