prettified kb menu
This commit is contained in:
parent
3bca16ac73
commit
4ec0a6e706
1 changed files with 6 additions and 7 deletions
|
|
@ -33,13 +33,12 @@ define(function(require, exports, module) {
|
|||
module.exports = function showKeyboardShortcuts (editor) {
|
||||
var kb = getEditorKeybordShortcuts(editor);
|
||||
var el = document.createElement('div');
|
||||
el.innerHTML = '<h1 style="padding-top:0; margin-top:0;">' +
|
||||
'Keyboard Shortcuts</h1><div>' +
|
||||
JSON.stringify(kb, null, ' ') +
|
||||
'</div>';
|
||||
el.style.cssText = 'margin:0; padding:0; ' +
|
||||
'background-color:white; color:black; ' +
|
||||
'white-space: pre-wrap;';
|
||||
var commands = kb.reduce(function (previous, current) {
|
||||
return previous + '<div><b>' + current.command + '</b> : ' +
|
||||
current.key + '</div>';
|
||||
}, '');
|
||||
el.innerHTML = '<h1>Keyboard Shortcuts</h1>' + commands;
|
||||
el.style.cssText = 'margin:0; padding:0;';
|
||||
overlayPage(el, '0', '0', '0', null);
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue