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) {
|
module.exports = function showKeyboardShortcuts (editor) {
|
||||||
var kb = getEditorKeybordShortcuts(editor);
|
var kb = getEditorKeybordShortcuts(editor);
|
||||||
var el = document.createElement('div');
|
var el = document.createElement('div');
|
||||||
el.innerHTML = '<h1 style="padding-top:0; margin-top:0;">' +
|
var commands = kb.reduce(function (previous, current) {
|
||||||
'Keyboard Shortcuts</h1><div>' +
|
return previous + '<div><b>' + current.command + '</b> : ' +
|
||||||
JSON.stringify(kb, null, ' ') +
|
current.key + '</div>';
|
||||||
'</div>';
|
}, '');
|
||||||
el.style.cssText = 'margin:0; padding:0; ' +
|
el.innerHTML = '<h1>Keyboard Shortcuts</h1>' + commands;
|
||||||
'background-color:white; color:black; ' +
|
el.style.cssText = 'margin:0; padding:0;';
|
||||||
'white-space: pre-wrap;';
|
|
||||||
overlayPage(el, '0', '0', '0', null);
|
overlayPage(el, '0', '0', '0', null);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue