prettified kb menu

This commit is contained in:
Matthew Kastor 2013-03-31 20:47:38 -04:00 • committed by nightwing
commit 4ec0a6e706

View file

@ -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);
}; };
}); });