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 cce71b86c5 - Show all commits

View File

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