MediaWiki:Common.js: Różnice pomiędzy wersjami
mNie podano opisu zmian |
Nie podano opisu zmian |
||
Linia 9: | Linia 9: | ||
} | } | ||
function shortcut() { | |||
function shortcut(value) { | |||
switch(value) { | |||
case 'strong': | |||
var selection = $('textarea').getSelection(); | |||
$('textarea').replaceSelectedText("'''" + selection + "'''"); | |||
break; | |||
} | } | ||
Linia 21: | Linia 27: | ||
$('textarea').bind('keydown', 'ctrl+ | $('textarea').bind('keydown', 'ctrl+b', shortcut('strong')); | ||