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 8a3baa6648 - Show all commits

View File

@@ -2,6 +2,16 @@
* 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) {
const element = document.getElementById(elementId);
element.innerHTML = hljs.highlightAuto(element.innerText).value