1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 15:47:00 +02:00

Edit json and jsonb types in textarea

This commit is contained in:
Kakysha
2015-09-15 01:34:01 +03:00
committed by Jakub Vrana
parent 842ea0bd46
commit 4a69059e1b
2 changed files with 2 additions and 2 deletions

View File

@@ -907,7 +907,7 @@ function input($field, $value, $function) {
$attrs .= " cols='30' rows='$rows'" . ($rows == 1 ? " style='height: 1.2em;'" : ""); // 1.2em - line-height
}
echo "<textarea$attrs>" . h($value) . '</textarea>';
} elseif ($function == "json") {
} elseif ($function == "json" || preg_match('~^jsonb?$~', $field["type"])) {
echo "<textarea$attrs cols='50' rows='12' class='jush-js'>" . h($value) . '</textarea>';
} else {
// int(3) is only a display hint