phpmyadmin/resources/js/transformations/json_editor.ts
Maurício Meneghini Fauth 01e4a87bbd
Move resources/js/src to resources/js
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2025-05-22 13:43:59 -03:00

21 lines
569 B
TypeScript

import $ from 'jquery';
import { AJAX } from '../modules/ajax.ts';
/**
* JSON syntax highlighting transformation plugin
*
* @package PhpMyAdmin
*/
AJAX.registerOnload('transformations/json_editor.js', function () {
($('textarea.transform_json_editor') as JQuery<HTMLTextAreaElement>).each(function () {
window.CodeMirror.fromTextArea(this, {
lineNumbers: true,
// @ts-ignore
matchBrackets: true,
indentUnit: 4,
mode: 'application/json',
lineWrapping: true
});
});
});