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>
$(".highlight").mark("<!--{$term}-->");
var context = document.querySelector(".highlight"); // requires an element with class "context" to exist
var instance = new Mark(context);
instance.mark("<!--{$term}-->");
</script>
</script>

Revision as of 22:20, 13 September 2021

<script> var context = document.querySelector(".highlight"); // requires an element with class "context" to exist var instance = new Mark(context); instance.mark(""); </script>