Solved issue#19, added default XML

This commit is contained in:
2023-02-14 11:04:43 +01:00
parent e994881ff0
commit ce02db8f6d
3 changed files with 45 additions and 11 deletions

View File

@@ -11,6 +11,18 @@ function clearDefaultContent(element, text) {
}
}
function fillDefaultXML(element) {
if(element.classList.contains("active")){
const serverAddress = window.location.protocol + "//" + window.location.hostname + ":8086";
clearDefaultContent(document.getElementById("xmlArea"), "Insert XML here");
fetch(serverAddress + "/assets/samples/sampleXml.xml")
.then(response => response.text())
.then((exampleData) => {
document.getElementById("xmlArea").value = exampleData;
})
}
}
//Set default text in grey
function setDefaultContent(element, text) {
if (element.value == "") {