Widget:Highlight: Difference between revisions

From Rangjung Yeshe Wiki - Dharma Dictionary
Jump to navigation Jump to search
((by SublimeText.Mediawiker))
((by SublimeText.Mediawiker))
Line 1: Line 1:
<script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" type="javascript"></script><script>
var context = document.querySelector(".highlight"); // requires an element with class "context" to exist
var context = document.querySelector(".highlight"); // requires an element with class "context" to exist
var instance = new Mark(context);
var instance = new Mark(context);
instance.mark("<!--{$term}-->");
instance.mark("<!--{$term}-->");
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" type="javascript"></script>
</script>

Revision as of 22:22, 13 September 2021

<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" type="javascript"></script><script> var context = document.querySelector(".highlight"); // requires an element with class "context" to exist var instance = new Mark(context); instance.mark(""); </script>