2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-09-24 16:40:55 -06:00

Fix #380 Custom attributes for toolbar buttons

This commit is contained in:
Zignature 2022-01-09 01:31:02 +01:00
parent 59a676bc8a
commit 33ae539f5e

View File

@ -231,6 +231,12 @@ function createToolbarButton(options, enableActions, enableTooltips, shortcuts,
}
}
if (options.attributes) {
for (var attribute in options.attributes) {
el.setAttribute(attribute, options.attributes[attribute]);
}
}
if (options.noDisable) {
el.classList.add('no-disable');
}