Added syntax highlighting for XML Tools #156
@@ -2,6 +2,16 @@
|
|||||||
* This file contains scripts needed for syntax highlight to work.
|
* This file contains scripts needed for syntax highlight to work.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This functions highlight element with provided ID.
|
||||||
|
*
|
||||||
|
* @function
|
||||||
|
* @name highlightSyntax
|
||||||
|
* @kind function
|
||||||
|
* @param {any} elementId
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
function highlightSyntax(elementId) {
|
function highlightSyntax(elementId) {
|
||||||
const element = document.getElementById(elementId);
|
const element = document.getElementById(elementId);
|
||||||
element.innerHTML = hljs.highlightAuto(element.innerText).value
|
element.innerHTML = hljs.highlightAuto(element.innerText).value
|
||||||
|
|||||||
Reference in New Issue
Block a user