mirror of
https://github.com/vrana/adminer.git
synced 2025-08-26 07:44:37 +02:00
Highlight code in <textarea>
This commit is contained in:
@@ -27,6 +27,12 @@ function bodyLoad(version) {
|
||||
jush.custom_links = jushLinks;
|
||||
}
|
||||
jush.highlight_tag('code', 0);
|
||||
var tags = document.getElementsByTagName('textarea');
|
||||
for (var i = 0; i < tags.length; i++) {
|
||||
if (/(^|\s)jush-/.test(tags[i].className)) {
|
||||
jush.textarea(tags[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
script.onreadystatechange = function () {
|
||||
|
@@ -366,6 +366,9 @@ function getTarget(event) {
|
||||
*/
|
||||
function bodyKeydown(event, button) {
|
||||
var target = getTarget(event);
|
||||
if (target.jushTextarea) {
|
||||
target = target.jushTextarea;
|
||||
}
|
||||
if (isCtrl(event) && (event.keyCode == 13 || event.keyCode == 10) && isTag(target, 'select|textarea|input')) { // 13|10 - Enter
|
||||
target.blur();
|
||||
if (button) {
|
||||
|
Reference in New Issue
Block a user