Widget:Highlight

From Rangjung Yeshe Wiki - Dharma Dictionary
Revision as of 12:50, 13 September 2021 by Jeremi (talk | contribs) ((by SublimeText.Mediawiker))
Jump to navigation Jump to search

<script> function highlight(text) { var inputText = document.getElementById("bodyContent"); var innerHTML = inputText.innerHTML; var index = innerHTML.indexOf(text); if (index >= 0) { innerHTML = innerHTML.substring(0,index) + "" + innerHTML.substring(index,index+text.length) + "" + innerHTML.substring(index + text.length); inputText.innerHTML = innerHTML; } } window.onload = highlight(""); </script>