Added syntax highlighting for XML Tools #156

Merged
bema merged 33 commits from bema/func/syntax_highlight into master 2023-05-08 11:11:18 +02:00
Showing only changes of commit c008382af6 - Show all commits

View File

@@ -13,8 +13,8 @@ const color_red = "#ff8f8f";
* @returns {void} * @returns {void}
*/ */
function clearDefaultContent(element, text) { function clearDefaultContent(element, text) {
if (element.value == text) { if (element.innerText == text) {
element.value = ""; element.innerText = "";
element.style.color = "#000000"; element.style.color = "#000000";
element.style.backgroundColor = "#ffffff"; element.style.backgroundColor = "#ffffff";
} }
@@ -57,9 +57,11 @@ function clearDataField() {
document.getElementById("xmlArea").style.color = null; document.getElementById("xmlArea").style.color = null;
document.getElementById("xmlArea").style.backgroundColor = null; document.getElementById("xmlArea").style.backgroundColor = null;
document.getElementById("transformArea").value = ""; document.getElementById("transformArea").innerHTML = "";
document.getElementById("transformArea").style.color = null; document.getElementById("transformArea").style.color = null;
document.getElementById("transformArea").style.backgroundColor = null; document.getElementById("transformArea").style.backgroundColor = null;
document.getElementById("resultArea").innerHTML = "";
} }