2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-23 09:54:28 -06:00

Add option.label for buttons

This commit is contained in:
Gregory Igelmund 2023-11-09 12:49:20 +01:00
parent 35587a9477
commit b964031b5b
No known key found for this signature in database
GPG Key ID: 7014FB8C0081D485

View File

@ -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');