Added XSLTTemplate, functions that add it to transform area and documentation for that function (#144)
Co-authored-by: widlam <mikolaj.widla@gmail.com> Reviewed-on: #144 Reviewed-by: Adam Bem <bema@noreply.example.com> Co-authored-by: Mikolaj Widla <widlam@noreply.example.com> Co-committed-by: Mikolaj Widla <widlam@noreply.example.com>
This commit is contained in:
@@ -84,6 +84,24 @@ function fillDefaultXML(element) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The `fillDefaultXSLT()` function fetches a default XSLT template from the server and sets the value of the element with id "transformArea" to the fetched template.
|
||||
*
|
||||
* @function
|
||||
* @name fillDefaultXSLT
|
||||
* @kind function
|
||||
* @returns {void}
|
||||
*/
|
||||
function fillDefaultXSLT() {
|
||||
const serverAddress = window.location.protocol + "//" + window.location.hostname + ":8086";
|
||||
fetch(serverAddress + "/assets/samples/XSLTTemplate.xslt")
|
||||
.then( response => response.text() )
|
||||
.then( (XSTLTemplate) => {
|
||||
document.getElementById('transformArea').value = XSTLTemplate;
|
||||
} )
|
||||
}
|
||||
|
||||
/**
|
||||
* It sets default content for the element an changes it's color to grey
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user