mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-24 10:24:29 -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');
|
||||
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) {
|
||||
el.title = createTooltip(options.title, options.action, shortcuts);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user