Json formatter style.

This commit is contained in:
2023-03-07 17:56:55 +01:00
parent 913c7b395a
commit ddebbe3afd
3 changed files with 91 additions and 5 deletions

View File

@@ -60,4 +60,15 @@ function minimizeJson(errorElement) {
processInfo.innerHTML = "<b style='color: red'>" + error + "</b>";
console.error('Error:', error);
});
}
function clearJsonData() {
const input = document.querySelector('#jsonBlock');
input.textContent = "";
}
function insertDefaultJson() {
const input = document.querySelector('#jsonBlock');
input.textContent = "{\"enter\": \"your\", \"json\": \"here\"}";
hljs.highlightElement(input);
}