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

Plugin pretty-json-column: fix with enum (fix #928)

Also add syntax highlighting.
This commit is contained in:
Jakub Vrana
2025-03-19 18:22:57 +01:00
parent 0b063262ee
commit 2dd32cf534

View File

@@ -18,9 +18,8 @@ class AdminerPrettyJsonColumn {
$json = $this->testJson($value);
if ($json !== $value) {
$jsonText = json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
return "<textarea$attrs cols='50' rows='20'>" . Adminer\h($jsonText) . "</textarea>";
return "<textarea$attrs cols='50' rows='20' class='jush-js'>" . Adminer\h($jsonText) . "</textarea>";
}
return '';
}
function processInput($field, $value, $function = '') {