mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-23 01:44:31 -06:00
Add option.label for buttons
This commit is contained in:
parent
35587a9477
commit
b964031b5b
@ -250,6 +250,14 @@ function createToolbarButton(options, enableActions, enableTooltips, shortcuts,
|
||||
|
||||
el.tabIndex = -1;
|
||||
|
||||
if (options.label) {
|
||||
// Create label inside utton
|
||||
var label = document.createElement('span');
|
||||
label.innerHTML = options.label;
|
||||
label.classList.add('label');
|
||||
el.appendChild(label);
|
||||
}
|
||||
|
||||
if (iconClasses.length > 0) {
|
||||
// Create icon element and append as a child to the button
|
||||
var icon = document.createElement('i');
|
||||
|
Loading…
x
Reference in New Issue
Block a user