Skip to content

Commit

Permalink
Merge pull request #75 from ysykzheng/master
Browse files Browse the repository at this point in the history
fix custom action shortcut not working
  • Loading branch information
Ionaru committed Apr 15, 2019
2 parents aa7ea0b + 98ab351 commit 8e46c9f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/js/easymde.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8e46c9f

Please sign in to comment.