mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-08-12 03:32:44 -06:00
Add support for text buttons
This commit is contained in:
parent
c311bfa6b0
commit
38717daffe
@ -236,7 +236,11 @@ function createToolbarButton(options, enableActions, enableTooltips, shortcuts,
|
|||||||
el.setAttribute('type', markup);
|
el.setAttribute('type', markup);
|
||||||
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
|
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
|
||||||
|
|
||||||
// Properly hande custom shortcuts
|
if (options.text) {
|
||||||
|
el.innerText = options.text;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Properly handle custom shortcuts
|
||||||
if (options.name && options.name in shortcuts) {
|
if (options.name && options.name in shortcuts) {
|
||||||
bindings[options.name] = options.action;
|
bindings[options.name] = options.action;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user