Dim Script As String = $"
function setCursorPos(){
var el = document.getElementsByClassName("${ACTIVE_ELEMENT_CLASS}$");
var selection;
if (window.getSelection) {
selection = window.getSelection();
} else if (document.selection && document.selection.type != "Control") {
selection = document.selection;}
var el = selection.anchorNode;
if(el){
if (el.nodeType == Node.TEXT_NODE){
do {
el = el.parentElement;
} while (el.nodeType == Node.TEXT_NODE);
}
el.classList.add("${ACTIVE_ELEMENT_CLASS}");
}
return selection.anchorOffset;
}"$