Browse Source

Merge pull request #75 from ysykzheng/master

fix custom action shortcut not working
tags/2.6.1
Jeroen Akkerman 5 months ago
parent
commit
8e46c9f3c9
No account linked to committer's email address
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/js/easymde.js

+ 5
- 0
src/js/easymde.js View File

@@ -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…
Cancel
Save