mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-25 10:54:28 -06:00
Merge pull request #75 from ysykzheng/master
fix custom action shortcut not working
This commit is contained in:
commit
8e46c9f3c9
@ -122,6 +122,11 @@ function createToolbarButton(options, enableTooltips, shortcuts) {
|
|||||||
el.setAttribute('type', 'button');
|
el.setAttribute('type', 'button');
|
||||||
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
|
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
|
||||||
|
|
||||||
|
// Properly hande custom shortcuts
|
||||||
|
if( options.name && options.name in shortcuts ){
|
||||||
|
bindings[options.name] = options.action;
|
||||||
|
}
|
||||||
|
|
||||||
if (options.title && enableTooltips) {
|
if (options.title && enableTooltips) {
|
||||||
el.title = createTooltip(options.title, options.action, shortcuts);
|
el.title = createTooltip(options.title, options.action, shortcuts);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user